By mattys on
Hi
My site is here http://www.fdea.co.uk/sitemaster-epc-order-form.html.
I would like to be able to change the 'select...' text for the drop downs in the Requests fieldset to '0', but cannot see how to do this.
Does anyone know!?
Thanks
Matt
Comments
When you edit a webform
When you edit a webform field, you can specify a default value. it is the third textbox.
thanks watcha i had done this
thanks watcha
i had done this already, for the 'Book on demonstration day' drop down, is still set to display 0, but still displays select...
I have also set default value for Order Sitemaster EPC drop down to 0, but also still displays select...
I have flushed caches, but no difference.
Maybe I'm missing something...!?
Matt
Set the component to
Set the component to mandatory, and it will display the default option, instead of "select..."
i set to mandatory, but it
i set to mandatory, but it still didn't display 0
also, i don't want t set to mandatory as the info isn't mandatory
any other ideas?
tested on drupal 6.19
tested on drupal 6.19 webform-6.x-3.2
Enable module
create form
add select list component
changed default value to "0"
saved
cleared cache.
These steps display a "0" instead of "settings..."
yep, done all this, 6.19,
yep, done all this, 6.19, double, triple, quadrauple checked, no joy...
Sorry, cant reproduce your
Sorry, cant reproduce your error.
last resort is to edit webform/components/select.inc
comment out lines 274-6
Hacking the Core module is a terrible idea because you may introduce new errors, and your changes will disappear when you update the module
yep, don't want to do that,
yep, don't want to do that, especially because i only want this for this form
thanks for help watcha, appreciated
puedes identificar el id del
puedes identificar el id del form y con ello modificar la linea segun el form que se va a mostrar.
if($component['nid']==137){
$options = array('' => ($component['mandatory'] ? t('- tut texto -') : t('- None -'))) + $options;
}else{
$options = array('' => ($component['mandatory'] ? t('- Select -') : t('- None -'))) + $options;
}
Saludos
Set piped values and reference default
I can make things work here by using key-value pairs for Option values, and referencing the chosen Option value in the Default field. So:
Default value:
0_User
Options:
0_User|0 User
1_User|1 User
2_Users|2 Users
3_Users|3 Users
...
Cache must be flushed. Keys can't have spaces.
This works, too - perhaps simplest, but only number is stored in DB/passed to recipient:
Default value:
0
Options:
0|0 User
1|1 User
2|2 Users
3|3 Users
...
Hope this works for you...
Ed
in
in hook_form_alter:
$form['submitted']['field_name']['#options'][''] = t('bu');
thanks for the code, works
thanks for the code, works great!
I have a couple select fields for credit card and the following works.