Bump - Any ideas? Thanks!
Hi @Eliot_Shiner,
Can you please share the JS/jQuery script you are using and we can help you find the problem?
Best,
Hristian
So i’m using the following script and it’s appending to the URL but i’m wanting the form to also then pre-fill a field based on this parameter (which it seems it can’t do without loading the page with the parameter already in place).
<script>
var params = window.location.search;
var character = "&";
if (params == ""){
character = "?";
}
$("#lp-pom-button-202").click(function() { // Add Id of button
var url = $(this).attr('href').split("?")l0];
$(this).attr("href", url + params + character + "size=45ft"); // add parameters to pass through to lightbox
});
</script>
Thanks!
Hi @Eliot_Shiner,
Generally speaking pre-filling dropdowns is a bit tricky and even more so when the form is in a lightbox.
Lightboxes load content inside an iframe.
It’s not impossible but you would have to be comfortable writing and adjusting your own scripts.
Another member of the community, @Phillip, posted a break-down on how you would do it and the necessary script.
(Keeping in mind his form was on the main page).
Here is his explanation from a few years back.
It should give you a good starting point.
Best,
Hristian