I discovered that the default value is what is passed to the next part of the form. This includes hidden fields. Whatever someone inputs into whatever various fields you have, whether standard or extra, becomes the default value for that field. Although it uses the field tag as an identifier it does not pass field name or tag directly, just the default value associated with that tag.
Now if I could only figure out to make the default value of the hidden field pre-populate with the value of a custom field on the page (not the form) that could make this part of the form universal for my needs, rather than having to create a new form for each home. Any suggestions?
Hi, I have sent a message to Mike Challis the plugin author to reply to your question.
Regards
Thanks mbrsolution for your help!!
Actually I can also use the last parameter of the URL instead of a custom field on the page but I need a little help understanding how to do that in FSCF.
I looked at your forms, it looks like the hidden field villas is working. It is passing into your 2nd form. Is the problem resolved?
Hi Mike,
Thanks for your response.
Yes, I did get it working but I was wondering if there is any way to pass a value from the last parameter of the URL to the second part of the form? That would be ideal for me and would allow us to use just one form, rather than 40.
Outstanding plugin by the way!!
Thanks for your help.
Mark
You want to pass a value from the last parameter of the URL to the second part of the form.
Can you explain this? sorry I do not understand.
URL is: http://sunkissvacationhomes.com/orange-view-test/
I want to pass “orange-view-test” to the second part of the form. I know it can be done but I’m not sure if it can be done within FSCF or if it is something that has to be done by JS. I’m pretty sure PHP can handle it but I’m not experienced enough to know how to make it happen.
Alternatively if PHP or JS can’t do it from the URL, can a value from a custom field within the page be used to pass the value to the second part of the form?
Hi Mike,
I just wanted to let you know that I just made a donation. I’ve never donated to a plugin’s support before but I feel Fast Secure Contact Form is worthy of support.
If you have any suggestions on my previous support questions above please let me know.
Best regards,
Mark
I looked at your first form and I do not see orange-view-test as a field or anything. I am not clear as to what you need.
I do see a hidden field:
<input type="hidden" name="Villa" value="Orange View" />
Is that what you are trying to pass to the 2nd form?
If so it is working
<input type="hidden" name="Villa" value="Orange View" />
HI Mike,
“Orange-View-Test” is the last part of the page URL.
I could also create a custom page field (metadata field) with a value of the same thing. The custom page field is not part of the form. What I’m asking is if there is a way to pass either the last part of the page URL OR the custom metadata field to the second part of the form?
The reason for the above is that as it is now I need to create a separate form for each of the property pages (about 40), all with different hidden values to be passed to the second part of the form. If I could pass the value of the last part of the URL OR the custom metadata field I could re-use a single form on all property pages. The identifier to be passed would come from the property page rather than the form. This would make it reusable for me with far more universal application in the future.
I can make you a custom function for that, you then put the function in your theme’s functions.php file
Contact me and I will send it to you today