<commit_before><?php
/**
 * Created by <NAME>
 * Date: 03/12/14
 * Time: 12:27.
 */

namespace Pirastru\FormBuilderBundle\FormFactory;

use Gregwar\CaptchaBundle\Type\CaptchaType;
use Symfony\Component\Form\Extension\Core\Type\ButtonType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\ResetType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Validator\Constraints\DateTime;
use Symfony\Component\Validator\Constraints\Email;
use Symfony\Component\Validator\Constraints\EqualTo;

class FormBuilderFactory
{
    /**
     * Email Field.
     */
    public function setFieldEmailinput($formBuilder, $key, $elem)
    {
        $formBuilder->add('email_'.$key, 'email', array(
            'required' => $elem->fields->required->value,
            'label' => $elem->fields->label->value,
            'help_block' => $elem->fields->helptext->value,
            'attr' => array(
                'placeholder' => $elem->fields->placeholder->value,
            ),
            'constraints' => array(
                new Email(),
            ),
        ));

        return array('name' => 'email_'.$key, 'size' => $this->getSelectedValue($elem->fields->inputwidth->value));
    }

    /**
     * Date Field.
     */
    public function setFieldDateinput($formBuilder, $key, $elem)
    {
        $formBuilder->add('date_'.$key, 'date', array(
            'required' => $elem->fields->required->value,
            'widget' => 'single_text',
            'label' => $elem->fields->label->value,
            'input' => 'datetime',
            'help_block' => $elem->fields->helptext->value,
            'attr' => array(
                'class' => 'date ',
                'placeholder' => $elem->fields->placeholder->value,
            ),<commit_msg>Moved date help to label<commit_after><?php
/**
 * Created by <NAME>
 * Date: 03/12/14
 * Time: 12:27.
 */

namespace Pirastru\FormBuilderBundle\FormFactory;

use Gregwar\CaptchaBundle\Type\CaptchaType;
use Symfony\Component\Form\Extension\Core\Type\ButtonType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\ResetType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Validator\Constraints\DateTime;
use Symfony\Component\Validator\Constraints\Email;
use Symfony\Component\Validator\Constraints\EqualTo;

class FormBuilderFactory
{
    /**
     * Email Field.
     */
    public function setFieldEmailinput($formBuilder, $key, $elem)
    {
        $formBuilder->add('email_'.$key, 'email', array(
            'required' => $elem->fields->required->value,
            'label' => $elem->fields->label->value,
            'help_block' => $elem->fields->helptext->value,
            'attr' => array(
                'placeholder' => $elem->fields->placeholder->value,
            ),
            'constraints' => array(
                new Email(),
            ),
        ));

        return array('name' => 'email_'.$key, 'size' => $this->getSelectedValue($elem->fields->inputwidth->value));
    }

    /**
     * Date Field.
     */
    public function setFieldDateinput($formBuilder, $key, $elem)
    {
        $formBuilder->add('date_'.$key, 'date', array(
            'required' => $elem->fields->required->value,
            'widget' => 'single_text',
            'label' => $elem->fields->label->value,
            'input' => 'datetime',
            'help_label' => $elem->fields->helptext->value,
            'attr' => array(
                'class' => 'date ',
                'placeholder' => $elem->fields->placeholder->value,
            ),
{'fraction_non_alphanumeric': 0.16398801416507763, 'fraction_numerical': 0.005448106782892944, 'mean_word_length': 2.4871794871794872, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 97, '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': '953061', 'n_tokens_mistral': 1078, 'n_tokens_neox': 1065, 'n_words': 170}