Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I would like to change the class in the attributes before rendering the form.
In function webform_client_form (.module file) there is this line
$form['#attributes'] = array('class' => 'webform-client-form');
I would like to specify which class to evaluate the attributes array with. I want to do by retrieving the value from a CCK text field.
How do I do this? Any hooking? Of course, I would like to avoid changing the code itself.
Thanks.
[private ref: tfs fontsize of items]
Comments
Comment #1
avior CreditAttribution: avior commentedHi Amir
You did not explain why do you want to do it
I guess it's for theming options , isn't the id enough ?
because the markup is like that
so you could use somthing like #webform-client-form-26 label in the css
Comment #2
Amir Simantov CreditAttribution: Amir Simantov commentedThanks Avior.
I must do it in runtime! That is, to choose which class to use according to a value saved in a CCK field.
Comment #3
avior CreditAttribution: avior commentedtry to use hook form_alter
try to see what you can change there
Comment #4
quicksketch