<commit_before><?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace User\Form;

use Zend\Form\Form;

class User extends Form
{
    public function __construct()
    {
        parent::construct();

        // Define email element.
        $this->add(array(
            'name'       => 'email', // unique name of the element
            'type'       => 'Zend\Form\Element\Email', // Must be a valid Zend Form element.
            'options'    => array(
                // List of options that we can add to the element.
                'label'         => 'Email:'
            ),
            'attributes' => array(
                // These are the attributes that are passed directly to the HTML element
                'type'          => 'email',
                'required'      => 'required',
                'placeholder'   => 'Email Address',
            ),
        ));

        // Define a phone element.
        $this->add(array(
            'name' => 'phone',
            'options' => array(
                'label' => 'Phone number'
            ),
            'attributes' => array(
                // Below: HTML5 way to specify that thei nput will be a phone number
                'type' => 'tel',
                'required' => 'required',
                'pattern' => '^[\d-/]+$',
            ),
        ));

    }
}<commit_msg>Building up more of the form.<commit_after><?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace User\Form;

use Zend\Form\Form;

class User extends Form
{
    public function __construct()
    {
        parent::construct();

        
        $this->setAttribute('method', 'post');
        
        
        
        // Define email element field.
        $this->add(array(
            'name'       => 'email', // unique name of the element
            'type'       => 'Zend\Form\Element\Email', // Must be a valid Zend Form element.
            'options'    => array(
                // List of options that we can add to the element.
                'label'         => 'Email:'
            ),
            'attributes' => array(
                // These are the attributes that are passed directly to the HTML element
                'type'          => 'email',
                'required'      => 'required',
                'placeholder'   => 'Email Address',
            ),
        ));

        // Define a phone element field
        $this->add(array(
            'name'       => 'phone',
            'options'    => array(
                'label'     => 'Phone number'
            ),
            'attributes' => array(
                // Below: HTML5 way to specify that thei nput will be a phone number
                'type'      => 'tel',
                'required'  => 'required',
                'pattern'   => '^[\d-/]+$',
            ),
        ));
        
        // Define password field
        $this->add(array(
          'name'       => 'password',
          'type'       => 'Zend\Form\Element\Password',
          'attributes' => array(
            'placeholder' => 'Password',
            'required'    => 'required',
          ),
          'options'    => array(
            'label'       => 'Password',
          ),
        ));

        // Define verify password field
        $this->add(array(
          'name'       => 'password_verify',
          'type'       => 'Zend\Form\Element\Password',
          'attributes' => array(
            'placeholder' => 'Verify Password Here',
            'required' => 'required',
          ),
          'options'    => array(
            'label'       => 'Verify Password',
          ),
        ));
        
        // Define name field
        $this->add(array(
          'name'       => 'name',
          'type'       => 'Zend\Form\Element\Text',
          'attributes' => array(
            'placeholder' => 'Type name',
            'required'    => 'required',
          ),
          'options'    => array(
            'label'       => 'Name',
          ),
        ));
        
        
        $this->add(array(
          'name'       => 'phone',
          'options'    => array(
            'label'   => 'Phone number'
          ),
          'attributes' => array(
            'type'    => 'tel',
            'required'=> 'required',
            'pattern' => '^[\d-/]+$'
          ),
        ));
        
        
        $this->add(array(
          'type'       => 'Zend\Form\Element\File',
          'name'       => 'photo',
          'options'    => array(
            'label'     => 'Your photo'
          ),
          'attributes' => array(
            'required'  => 'required',
            'id'        => 'photo',
          ),
        ));
        
        
    }
}
{'fraction_non_alphanumeric': 0.13768844221105528, 'fraction_numerical': 0.0004020100502512563, 'mean_word_length': 1.2027445772465692, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 78, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4021502', 'n_tokens_mistral': 1298, 'n_tokens_neox': 1263, 'n_words': 354}