Prefill form in Divhunt using url parameters

Is it possible to prefill a form using url parameters? How?

for example, if I have a form with name and email plus other fields, but I want to save time for the user to fill in the form, I would send the user a url like website/form?name=xxx&email=yyy

That would be awesome

Yes.

For example if input needs to take paramter name from url, in value of your input type:

${query->get('name')}

BRILLIANT !!

This is opening so many possibilities!

Many thanks!

@Pakic How to avoid displaying “null” when accessing the form while no parameter is in the url?

${query->get('name', 'default value')}

in your case you can use empty string as default:

${query->get('name', ' ')}
2 Likes

Works perfect!!
Thank you!!!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.