Closed (fixed)
Project:
Webform
Version:
6.x-2.7
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
3 Aug 2009 at 17:05 UTC
Updated:
21 Jan 2010 at 08:40 UTC
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 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 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 commentedtry to use hook form_alter
try to see what you can change there
Comment #4
quicksketch