You are viewing limited content. For full access, please sign in.

Question

Question

Some of the fields don't retain value after submission.

asked on April 10, 2015

After submitting a form, some of the fields do not retain their values. The variables of these fields are empty. I noticed it was happening with checkboxes and the radio button.

These fields (checkboxes) were ‘checked’ in the form before submitting. But after submission, the corresponding variables lose its value. These variables are then empty.

Please see screenshot below. I have also attached a copy of our form.

This is happening in the section where we have some JavaScripts to validate few things.

Two screenshots- 

1.) Screenshot from Repository showing that the checkbox is missing (it was checked before submitting the form)-

2.) Variable values showing that the variable does NOT retain value of the checkbox-

I would appreciate if you can let me know how we can resolve this issue. 

 

Checkboxes missing.jpg
Variable values missing.jpg
0 0

Replies

replied on April 10, 2015

Hi Manish,

When the "submit" button is pressed, Forms re-populates the values from any database lookups (if configured) and runs the javascript. I suspect the javascript to tick the boxes isn't being run. Does this sound likely? Also, can you provide the javascript?

-Ben

0 0
replied on April 13, 2015

Hi Ben, 

Below is the code- 

 

       $('……').find(":checkbox").each(function () {

 

       var display = "none";

        if ($(this).is(":checked"))

            display = "block";

 

        var PranetLI = this.closest('li'); //

        var NumberOfItems = 3 ;

        var Li = PranetLI.nextAll('li:lt(' + NumberOfItems + ')');

        if (Display == "block")

           Li.removeClass('hidden');

        else

            Li.addClass('hidden');

 

        })

 

Appreciate your help. 

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.