Hi
Scenario - one simple form with name / phone / email / subject / message fields. I would like to be able to (somehow) pass a value to the "Field Value" of the "subject" text field.
In simple terms, I have a Joomla category of approx 20 artists, and would like to have a "Contact us for more info about this artist" on each artist's page, that would then open the Chronoform (as above) with the subject field pre-populated with (for example): "Artist - Joe Blow"
Is this possible?
At first the custom PHP code was blowing up my form, but then I noticed I needed to close the urldecode line with an end parentheses.
Just about exactly what I've been looking for! I have a similar challenge I'm addressing. Now to pass my variable to a destination URL!
Mark
Next-challenge: I've successfully created a hidden field that I can pass a value to.
My client wants visitors to fill out a form prior to viewing the content. I want to re-use this form for multiple story links and use a variable to determine the destination re-direction after submittal of the form. I'm declaring the link value by using the menu item alias to the story as the hidden field. After completion, I wish to pass this alias field to the destination url i.e. http://somesite/(hidden variable)
In this case, my variable is 'story' and I wish to append this value to the url.
I've hit a bit of a roadblock...but I'm soooooo close! 😀
Mark
Thank you for the quick reply. The url code part works fine, but I'm having difficulty getting the variable to work when tagging it to the end of the url string.
I'm using the example code:
<?php
$form->data['story'] = url_decode($form->data['story']);
?>
in the on load section of the forrn and can pass that string to the hidden field in the form. However I can't seem to get that same value to work in the url string I pass to the redirect.
i.e. http://mysite.com/{story}
Hi mmaack,
Where exactly are you using http://mysite.com/{story} ? You can't use the {} syntax in PHP, use $form->data['story'] there.
Bob
Hi mmaack,
Where exactly are you using http://mysite.com/{story} ? You can't use the {} syntax in PHP, use $form->data['story'] there.
Bob
Hi mmack.
Please try $url = 'http://www.legasusgroup.com/'.$form->data['story']; or $url = "http://www.legasusgroup.com/{$form->data['story']}"; either should work.
Or even $url = JURI::root().$form->data['story']; if this is on the same site.
Bob
Life is easy when YOU"RE THE MAN!!!!!!
Your suggestion worked like a champ!
Many Thanks!
Mark