Format custom form


(Steven) #1

Matrix Version: CitizenPortal v1.3

Is there a way in which I can markup a custom form any way I want?

I am creating a feedback form that will be displayed on everypage of the site.

I have a radio option question but each time I try to add the question to the page contents is brings with it some HTML that I want customize.
%question_field_40152_q4%

I’ve even tried writing the form elements myself and adding keyword replacements for the question IDs but this markup doesn’t work.
<input id="%question_id_40152_q4_0%" type="radio" name="%question_id_40152_q4%" value="0" class="sq-form-field">

I cannot find where the form elements HTML are being defined.

Any help to customize my form would be much appreciated.

Thanks
Steven


(Bart Banda) #2

What part do you want to customise? Just additional HTML attributes like class or or something like that? If so you can do that via the Extras field on the details screen of the input field.

Or, you can use a keyword modifier on that keyword to alter the HTML. For example, if you want to add some extra classes you could do something like:

%question_field_40152_q4^replace:class=":class="my own classes %

(Steven) #3

Thanks @Bart That will do nicely.

Steven