Populate Bricks Form fields with url parameters

I have several forms in off-canvas elements, and I’d like to populate fields in those forms based on what’s clicked on the page. Let’s say I wanted to populate a field with the attribute name “service”, and ID is “hutjqb”. This is a select field. These are the options for the field:
ar:Appliance removal
f:Furniture
bi:Bulky items
sc:Storage cleanout
oc:Office cleanout
yd:Yard debris
tr:Trash removal
o:Other

Is this possible?

@sinanisler You were so helpful on another post. Curious if you had any insight into this one?

you can fill field values from the url

page needs to open with those url parameters to fill it.

if you use this as multiple times yes you can build your select field options as well
try it

Thank you @sinanisler! That is working. The way I have it set up, it is reloading the page each time the links in question are clicked in order to add the correct parameter. Sound correct?

However, I’m now not able to use my other buttons that were triggering the off-canvas without the need for field population b/c of the condition that looks for services in the url. Any suggestions to be able to use the same off-canvas but have the 2 separate triggers working?

yep thats good way to solve this natively.

when the fields are added to the url values open the offcanvas automaticly ater the refresh thats possible too

1 Like