Douglas
(Douglas (@finnatic at @waikato))
July 15, 2021, 3:22am
1
Matrix Version: 5.5.6.4
Trying to use custom markup alongside a Custom Form - and losing the contents of inputs on a submit that has the form indicate errors.
Can anyone provide guidance on which parts of the base squiz markup e.g. the following I need to replicate in my custom markup
<div class="sq-form-question sq-form-question-text " id="sq_form_field_wrapper_q712853_q1">
<label class="sq-form-question-title" for="q712853_q1">First name</label>
<div class="sq-form-question-answer"><input type="text" name="q712853:q1" value="" size="30" maxlength="300" id="q712853_q1" class="sq-form-field" /></div>
</div>
Bart
(Bart Banda)
August 21, 2021, 4:01am
2
Can you explain a bit more of what you mean by this?
Also, curious to know why you need to completely customise the markup like this? What problem are you trying to solve? Maybe there’s an alternative way?
hmcmaster
(Hugh McMaster)
September 15, 2021, 2:17pm
3
I’m probably too late, but you need to use keywords to build your form input, labels, questions, etc.
You can still add classes and attributes as required, either when coding the form or in each field configuration.
%question_field_<parent_id>_<question_id>%
Matrix will then retain the values entered/selected if there are errors.