This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Force Uppercase of form text field

New topics about Symfony 2 should go here

Force Uppercase of form text field

by mjs1138 » Tue Jun 16, 2015 6:11 pm

I've inherited a sf project that has a form built as such:
Code: Select all
        $builder
            ->add('Status', 'choice', array(
              'choices' => array('' => '', 'PASS' => 'PASS', 'FAIL' => 'FAIL', 'INCOMPLETE' => 'INCOMPLETE', 'DROPPED' => 'DROPPED',),
              'required' => FALSE,
            ))
            ->add('First_Name', 'text', array('label'=>'First Name',
              'required' => FALSE))
            ->add('Last_Name', 'text', array('label'=>'Last Name',
              'required' => FALSE))
            ->add('PID', 'text', array('label'=>'License Number',
              'required' => FALSE))
           ;


I need to have any letters entered in the PID field to be force to uppercase but cannot find a option/attribute to do this.

Is there any way to do this?
mjs1138
Junior Member
 
Posts: 5
Joined: Tue Apr 15, 2014 11:39 pm