Crawford Tait Posted June 9, 2021 Share Posted June 9, 2021 Hi, I have a job template that embeds an application form from FormBuilder. I need to get some info about the role into the form, and am doing this by inserting the values into the querystring in the template, then configuring the form to pick up querystring values and put them in a couple of hidden fields: $input->get['vacancy'] = $page->title; $input->get['pageid'] = $page->id; This does feel a bit odd, but I couldn't think of another way as I can't get inside the form iframe. Now, it works, except sporadically, it doesn't and tha values are just blank. I'm tearing my hair out as this is server-side and I wouldn't expect it to sometimes work and sometimes not, so... Can anyone think of a reason why this would sometimes fail? Can anyone recommend a better solution for getting values into the form? previously I had the values appended to site links to the jobs, but the problem is it needs to work if you just arrive at a job from elsewhere, so has to be self-contained. TIA Crawford. Link to comment Share on other sites More sharing options...
Robin S Posted June 9, 2021 Share Posted June 9, 2021 If you have the "Preset field values from GET variables?" setting checked you can use embed option B (Template Embed) and set field values in a second argument to $forms->embed() echo $forms->embed('your_form_name', [ 'vacancy' => $page->title, 'pageid' => $page->id ]); 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now