Form: is it possible to edit the default value of a field at a landing page level?

Cecile_Maindron
Level 10

Form: is it possible to edit the default value of a field at a landing page level?

Hi,

we are using same form on a couple of specific landing pages. There is an hidden field that is populated by a ?product= value at the end of each urls and we have a common default value. It appears that sometimes we forgot to add the ?product bit and end up with the default value. I would like to have a different value per landing page. Is it possible to edit field settings at a landing page level or is my only option to create a single form per landing page (or to remember to add the?xxx!) ?

Cécile @ Talend
Tags (1)
3 REPLIES 3
Anonymous
Not applicable

Re: Form: is it possible to edit the default value of a field at a landing page level?

The default can be set using a simple jQuery script:

<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
    // set no conflict mode for jquery
    var $jQ = jQuery.noConflict();
    var pproduct $jQ.getQueryString({ ID: "product" });
    var productLength = $("pproduct").val().length;
 
 
 
    $(document).ready(function () {
        if (productLength >= 6) {
            $('#product').attr(“value”, pproduct);
        });
</script>



I neither tested nor refined that script.

Please ensure your developers fully test it before moving to production.
 
Cecile_Maindron
Level 10

Re: Form: is it possible to edit the default value of a field at a landing page level?

thanks Breno. However we have nobody in-house who can review script or populate it correctly so I will have to find another option.
Anonymous
Not applicable

Re: Form: is it possible to edit the default value of a field at a landing page level?

I will give it a go later today and post a fully tested version.