We are using one form for three different country pages. I have 3 rich text boxes that are hidden that contain a link specific to whichever country page( URL) the person accesses the form from so for example, if someone visits www.mysite.com/us/en/blog and goes to the form on that page, I need to have the embed form pick up the "us" portion of the URL and show the US specific text box. We then need the same to be for other country abbreviations as well. So the parameter rules to sho won't work, but was wondering if there was a specific script/way to help with this?
Thanks!
Visibility Rules will work together with a tiny bit of JS. Create a hidden field on your back end (this is always recommended anyway) LastFormURL.
Make the other fields' visibility depend on this field.
Set the field value with the typical boilerplate.
Typical boilerplate? Minimum JS skills here.
MktoForms2.whenReady(function(form){
form.addHiddenFields({
LastFormURL : document.location.href
});
});
(You'd find this code elsewhere in Community if you search for "LastFormURL".)