Prefill a custom form field with the answer from a previous question


(Margaret Chidgey) #1

Matrix Version: Not sure
Hi, I’ve created a custom form that’s split into sections.
I would like to prefill a question field in section 2 with the answer provided from a field in section 1.
I thought I had worked it out by doing this:

in the placeholder text for the second question, I added this keyword replacement:

%question_contents_[section ID]_[question ID]% for example %question_contents_408947_q2%

When the form is completed, the answer for the question in section 1 does indeed show up as placeholder text in the section 2 question.

Is there any way I can get it to actually prefill rather than just show the previous answer as placeholder text? The problem is that when the form contents are emailed, the placeholder text in the second question does not print.

I hope someone can help me out.
Thank you!


(Nic Hubbard) #2

Have you tried the “Sticky” option for those questions?


(Nick Papadatos) #3

Hi Margret,

I’ve done this many times but in all of my cases I always used client-side Javascript.


(Margaret Chidgey) #4

Thanks Nic, the “Sticky” option is just what I need. Thank you for your help!