Hi,
The following code placed into the “General Settiongs >> Edit Scripts” are of the plugin can help. With this sample script the field with ID “fieldname2” will be pre-filled, change the field ID (line #3 of the script) to match the ID of the field in your form:
function loaddata()
{
var fieldid = "fieldname2";
try {
var url = String(document.location);
document.getElementById(fieldid+"_1").value = url.substr( url.indexOf("=")+1);
} catch (e) {
setTimeout('loaddata()',100);
}
}
loaddata();
If you need a more detailed assistance please open a ticket at https://apphourbooking.dwbooster.com/contact-us indicating the address of the page that contains the form.
Thank you for using the plugin!
Thank you for your reply! With your example I was able to make it work.
Just a tip for the future: you might want to consider implementing a custom Javascript event like “ahbFormReady” or similar, then firing it when the form is fully loaded and ready, so that setTimeout checks are no longer necessary. It’s not a huge thing, but it could make things even better.
Hi,
Thank you for your feedback! Yes, we agree that’s a better solution and we will implement it in a future update.
Thank you for using the plugin!