I’m trying to populate a checkbox (Check the checkbox) based on a value from URL. I can do this with many regular like, text fields and stuff but I can’t seem to get the proper syntax for populating a checkbox.
How do I check a checkbox based on a variable from the URL of the field has “Populate value dynamically” is active for that field?
What I’m actually trying to accomplish is this. I’ve created a sort of psudo ticketing system. I’m using Gravity Perks to list the form entries in a table. I’m wanting to craft a URL from the table that when clicked, will open the form entry for editing, and allow me to set that checkbox as checked.
I’m not sure if it’s simply not something that Gravity Perks allows or not, but it appears not to work, at least from that interface. The checkbox is there, hidden within the form when rendered but I can’t alter the value.
Maybe there’s a better way to handle this, I’ve considered just writing a custom PHP script to handle this but it seemed like using a sledghhammer where a tackhammer would work.
In the checkbox field settings, turn on the ‘Allow field to be populated dynamically’ option.
Create your custom parameter.
Set the parameter value to the checkbox option label in the URL. Let’s say your option’s label is “First Option”, then set the parameter in the URL to: example.com/?custom_param=First%20Option.
Save your changes.
That should dynamically select the specified option in the checkbox, whether the field is visible or hidden.
Yup that is what I am doing and it’s not working.
It must be a Gravity Wiz issue. This isn’t an issue when creating a new form entry, it’s an issue when using the edit form entry view within Gravity Wiz’s perk ‘GP Entry Blocks’. I’ll submit a ticket to them and see if it’s something that can be addressed on their end.