Bug to understand and fix (GravityWiz) + Field value reset when fields become hidden again with a logical condition

A codeable project was publish here

Control mission to be carried out on 2 forms:
1 - a form that calculates the amount of a contribution
2 - the form that receives the values to display them

Situation

There is a form on the site that calculates the amount of contributions to be paid - a quotation form (ID 11)
This form uses Gravity Wiz (the most important plugin) which calculates the amount of 4 products based on birth dates.
The price is calculated and displayed immediately for the administrator
The user must press submit to be redirected to another form (ID 15) that takes the URL data and displays it on another page
A button then appears so that the user can return to the form (ID 15 to ID 11)

1 - Bug to understand and fix

These are the bugs found on the gravity-core log:

*2019-08-22 14:02:36.536701 - DEBUG --> GFFormDisplay::process_form(): Starting to process form (#11) submission. *
*2019-08-22 14:02:36.561520 - DEBUG --> GFFormDisplay::process_form(): Source page number: 1. Target page number: 0. *
*2019-08-22 14:02:36.605803 - DEBUG --> GFCommon::get_calculation_value(): No value or non-numeric value available for field #13.2 Returning zero instead. *
*2019-08-22 14:02:36.612319 - DEBUG --> GFCommon::get_calculation_value(): No value or non-numeric value available for field #14.2. Returning zero instead. *
*2019-08-22 14:02:36.618819 - DEBUG --> GFCommon::get_calculation_value(): No value or non-numeric value available for field #15.2. Returning zero instead. *
*2019-08-22 14:02:36.625392 - DEBUG --> GFCommon::get_calculation_value(): No value or non-numeric value available for field #17.2. Returning zero instead. *
*2019-08-22 14:02:36.674786 - DEBUG --> GFFormDisplay::process_form(): After validation. Is submission valid? No. *
*2019-08-22 14:02:36.69898981 - DEBUG --> GFCommon::get_calculation_value(): No value or non-numeric value available for field #13.2 Returning zero instead. *
*2019-08-22 14:02:36.705473 - DEBUG --> GFCommon::get_calculation_value(): No value or non-numeric value available for field #14.2. Returning zero instead. *
*2019-08-22 14:02:36.711937 - DEBUG --> GFCommon::get_calculation_value(): No value or non-numeric value available for field #15.2. Returning zero instead. *
2019-08-22 14:02:36.718425 - DEBUG --> GFCommon::get_calculation_value(): No value or non-numeric value available for field #17.2. Returning zero instead.

In the GravityForm documentation the bug is well cited with attempts to fix it

Documentation Gravity Form

By doing all the basic tests (theme deactivation, plugin…) proposed by Gravity Form the problem is still there
By asking Gravity Wiz, they don’t understand what’s going on and ask me to manage (but kindly :wink: ).

Unfortunately I don’t have the necessary level to fix and understand this bug.
For this it would be necessary that a developer who knows GravityForm perfectly and especially GravityWiz can take control directly on the website (be careful the website is online) to solve this problem.

2 - integration of a field value reset when the fields become hidden again with a logical condition

According to GravityWiz the following problem cannot be solved and it would be necessary to add an additional script.
Indeed, when switching from the calculation form (ID 11) to the display form, the data is transmitted in the URL.
There are logical conditions in Form 11 that hide fields and return empty data.

The problem is when you go back to form 11 and click on the button that hides the fields, the fields are not reset and the form cannot be sent.

So I would simply like these basic actions :

Field 43 (radio button) asks ALONE or FAMILY (it is this field that must clear the following prerecordings)

  • Field 7 (radio button) asks if you are insuring the spouse: YES or NO (this field must be reset to 0 if field 43 is Alone)
  • Field 6 (date) asks for the spouse’s date of birth (this field must be reset to 0 if field 43 is Alone)
  • Field 22 (radio button) asks if we insure children: YES or NO (this field must be reset to 0 if field 43 is Alone)
  • Field 27 (selection) asks for the number of children (this field must be reset to 0 if field 43 is Alone)

It’s finally quite simple, field 43 must reset the next 4 fields if it’s selected

To understand better this is the scenario :

So if you do the test according to the form can no longer be submitted:

On form ID 11
1 - Enter the member’s date of birth
2 - indicate ALONE (SEUL)
3 - Morocco
4 - A City
5 - contact details

Submit - display of the price list --> redirect to Form ID 15

Click on MODIFY QUOTATION INFORMATION (MODIFIER LES INFORMATIONS DU DEVIS) - the form returns to the data on Form ID 11

1 - Enter the member’s date of birth
2 - indicate IN FAMILY (EN FAMILLE)
3 - Spouse NO
4 - children YES
5 - number of children : select a number

6 - Morocco (preselected)
7 - A City (preselected)
8 - contact details (preselected)

Submit - display of the price list (on form ID 15)

Click on MODIFY QUOTATION INFORMATION (MODIFIER LES INFORMATIONS DU DEVIS) - the form returns to the data

1 - Enter the member’s date of birth
2 - RETURN ALONE (SEUL)

3 - Morocco (preselected)
4 - A City (preselected)
5 - contact details (preselected)

The form refuses the submission and the log records these errors, as if clicking ALONE did not erase the pre-recorded data