2

My question is about overriding webform-form.tpl.php. I am using Webform 4.x-beta1 and Twitter Bootstrap framework. I would like to reuse bootstrap classes in my form to make it responsive. I got already how the override works. I would want to find out is it possible to only override the markup of certain groups of fields, for example to put 3 fields that are in the middle of the form inline using row-fluid class in the wrapper div, without changing the placement of these fields.
Ex:
---some fields that don't need to be overwritten---
---3 overwritten fields----
---some other fields keeping the correct order---
---2 overwritten fields---
etc.
My form is about 100 fields, and as far as I understand, I will have to revisit each and every field in order to achieve what I need.
I am sorry if I mixed you up in my explanation, I am pretty new to Drupal.
Thank you in advance

0

Finally I created several css classes that I add either to element wrapper or to the input element itself, and I position each element accordingly.

If your form is not too long, and you don't mind creating other webform elements, you might want to wrap the fields that you want to put on the same line in a fieldset, you give row-fluid class to the fieldset, and all is good. This obviously also depends on the functioning of the form, some modules don't work as expected with nested fieldsets, ex. webform add more module (at leat las I checked it didn't, was about a month ago)

In my case I didn't want to do this, as the form is long and complicated and it could've broken some functioning.

Cheers!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.