<commit_before><?php
/*
 * This file is part of the Reditype package.
 *
 * (c) 2009-2010 digital Wranglers <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

/**
 * rtContactForm
 *
 * @package    rtCorePlugin
 * @subpackage form
 * @author     <NAME> <<EMAIL>>
 * @author     <NAME> <<EMAIL>>
 */
class rtBookingForm extends rtContactForm
{
    public function setup()
    {
        parent::setup();

        $this->widgetSchema['arrival_date'] = new sfWidgetFormInput();
        $this->widgetSchema['number_of_people'] = new sfWidgetFormInput(array(), array());

        $this->widgetSchema->setLabel('arrival_date', "Arrival Date:");
        $this->widgetSchema->setLabel('number_of_people', "Number of People:");

        $this->setValidator('arrival_date', new sfValidatorString(array('required' => true), array('required' => 'Please add your expected arrival date',)));
        $this->setValidator('number_of_people', new sfValidatorString(array('required' => false)));

        $this->widgetSchema->moveField('arrival_date', sfWidgetFormSchema::AFTER, 'phone');
        $this->widgetSchema->moveField('number_of_people', sfWidgetFormSchema::AFTER, 'arrival_date');


//        $this->widgetSchema->setNameFormat('bd_basic_form[%s]');
//        $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
    }
}<commit_msg>Added better form type configurations.<commit_after><?php
/*
 * This file is part of the Reditype package.
 *
 * (c) 2009-2010 digital Wranglers <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

/**
 * rtContactForm
 *
 * @package    rtCorePlugin
 * @subpackage form
 * @author     <NAME> <<EMAIL>>
 * @author     <NAME> <<EMAIL>>
 */
class rtBookingForm extends rtContactForm
{
    public function setup()
    {
        parent::setup();

        $this->widgetSchema['arrival_date'] = new sfWidgetFormInput(array('type' => 'date'));
        $this->widgetSchema['number_of_people'] = new sfWidgetFormInput(array('type' => 'number'));

        $this->widgetSchema->setLabel('arrival_date', "Arrival Date:");
        $this->widgetSchema->setLabel('number_of_people', "Number of People:");

        $this->setValidator('arrival_date', new sfValidatorString(array('required' => true), array('required' => 'Please add your expected arrival date',)));
        $this->setValidator('number_of_people', new sfValidatorString(array('required' => false)));

        $this->widgetSchema->moveField('arrival_date', sfWidgetFormSchema::AFTER, 'phone');
        $this->widgetSchema->moveField('number_of_people', sfWidgetFormSchema::AFTER, 'arrival_date');


//        $this->widgetSchema->setNameFormat('bd_basic_form[%s]');
//        $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
    }
}
{'fraction_non_alphanumeric': 0.15479031708148652, 'fraction_numerical': 0.005455165359699966, 'mean_word_length': 4.24865831842576, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 59, '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': '4604150', 'n_tokens_mistral': 873, 'n_tokens_neox': 839, 'n_words': 187}