• Resolved michaelrieder

    (@michaelrieder)


    Hi CodePeople

    My form works almost perfectly. There is only one small issue.

    When I press the reset-button (named: Pantani) the reset works fine the first time. After changing values again and pressing the reset-button the second (or third..) time it doesn’t what it sould do. It works when I press the reset-button twice.

    There is an additional code with the button:

    HIDEFIELD(‘fieldname72’);IGNOREFIELD(‘fieldname22’);HIDEFIELD(‘fieldname61’);SHOWFIELD(‘fieldname67’);getField(‘fieldname12’).jQueryRef().removeClass(‘cff-collapsed’);getField(‘fieldname36’).jQueryRef().removeClass(‘cff-collapsed’);

    Please can you check this.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @michaelrieder,

    I recommend running your code after completing the reset action. For example, you can modify the piece of code as follows:

    setTimeout(function(){
    HIDEFIELD('fieldname72');
    IGNOREFIELD('fieldname22');
    HIDEFIELD('fieldname61');
    SHOWFIELD('fieldname67');
    getField('fieldname12').jQueryRef().removeClass('cff-collapsed');
    getField('fieldname36').jQueryRef().removeClass('cff-collapsed');
    }, 500);

    Best regards.

    Thread Starter michaelrieder

    (@michaelrieder)

    Hi CodePeople

    It doesn’t help. Interestingly only have of the reset is executed. Two values are not set, one field is not shown, and one field is not calculated.

    Best Regards

    Plugin Author codepeople

    (@codepeople)

    Hello @michaelrieder

    When I press the “Pantani” button, the values of the fields are reset to the initial values as they should be, and I have repeated this several times. Could you tell me which fields are not reset?

    Best regards.

    Thread Starter michaelrieder

    (@michaelrieder)

    Hi CodePeople

    Ok. I select an ascend different to the initial one (Alpe d’Huez..). Then I press “Pantani” and every reset goes well. Then I select another ascend like Col du Sanetsch and press “Pantani” again. Then only half is reseted. With a second press on “Pantani” the reset is ok.

    Best Regards

    Plugin Author codepeople

    (@codepeople)

    Hello @michaelrieder

    Could you please modify the onclick event as follows?

    
    var me = this; setTimeout(function(){
    HIDEFIELD('fieldname72');
    IGNOREFIELD('fieldname22');
    HIDEFIELD('fieldname61');
    SHOWFIELD('fieldname67');
    getField('fieldname12').jQueryRef().removeClass('cff-collapsed');
    getField('fieldname36').jQueryRef().removeClass('cff-collapsed');
    EVALEQUATIONS(me.form);
    }, 500);

    Best regards.

    Thread Starter michaelrieder

    (@michaelrieder)

    Yes!!!! It works. Thanks a lot.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Reset’ is closed to new replies.