• Resolved tasmara0105

    (@tasmara0105)


    I’m working on showing messages to users when they select certain options, but when I have all the conditions made and click save only a part of the conditions are being saved and the content of thoose conditions is empty for the most part.

    So something is going wrong.

    I have groups that have conditional showing on two choises being [select stap2-energielabel-bedrijf-opname-oppervlakte “Ik heb echt geen idee” “<100m2” “100-250m2” “250-500m2” “500-1000m2” “1000-2000m2” “2000-3000m2” “3000-5000m2” “5000-7000m2” “7000-10.000m2” “>10.000m2”] and [select stap2-energielabel-bedrijf-opname-bouwtekeningen “Dat weet ik niet” “Jazeker!” “Nee, helaas”]

    I have these groups:
    [group prijs50m2mettekening]<p>De prijs voor dit energielabel is 215,- euro excl btw (260,15 euro incl btw)</p> [/group]
    [group prijs50m2zondertekening]<p>De prijs voor dit energielabel is 240,- euro excl btw (290,40 euro incl btw)</p> [/group]
    [group prijs50-150m2mettekening]<p>De prijs voor dit energielabel is 245,- euro excl btw (296,45 euro incl btw)</p> [/group]
    [group prijs50-150m2zondertekening]<p>De prijs voor dit energielabel is 275,- euro excl btw (332,75 euro incl btw) </p>[/group]
    [group prijs150-300m2mettekening]<p>De prijs voor dit energielabel is 285,- euro excl btw (344,85 euro incl btw) </p>[/group]
    [group prijs150-300m2zondertekening]<p>De prijs voor dit energielabel is 320,- euro excl btw (387,20 euro incl btw)</p> [/group]
    [group prijs300-500m2mettekening]<p>De prijs voor dit energielabel is 385,- euro excl btw (465,85 euro incl btw)</p> [/group]
    [group prijs300-500m2zondertekening]<p>De prijs voor dit energielabel is 425,- euro excl btw (514,25 euro incl btw) </p>[/group]
    [group prijs500m2mettekening]<p>De prijs voor dit energielabel is 385,- euro excl btw (465,85 euro incl btw) voor 500 m2 plus 73,- euro excl btw (88,33 euro incl btw)voor iedere extra 100 m2</p> [/group]
    [group prijs500m2zondertekening]<p>De prijs voor dit energielabel is 425,- euro excl btw (514,25 euro incl btw) voor 500 m2 plus 73,- euro excl btw (88,33 euro incl btw)voor iedere extra 100 m2 </p>[/group]

    Only the first two and the lat condition I added are being saved and as mentioned the first two are empty and the last one half empty after the save.

    I’ve using the pro version of conditional fields. Please send me your advice on what to do.

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

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Jules Colle

    (@jules-colle)

    Thanks, could you edit the code and wrap it with backticks so it looks like actual code? Or even better, post the code here: https://conditional-fields-cf7.bdwm.be/form-tester/

    • This reply was modified 3 years, 11 months ago by Jules Colle.
    Thread Starter tasmara0105

    (@tasmara0105)

    https://conditional-fields-cf7.bdwm.be/form-tester/?hash=35bf5ffc7c7eae8ceaf9b6e7b726ae38

    done this is after saving so you see the last few code being messed up in the conditions.

    Plugin Author Jules Colle

    (@jules-colle)

    It would be nice if you could simplify the form a bit because it’s hard to load all this information in my head.

    But a first thing that I see that looks wrong is that you have conditions like this:

    show [prijs50m2mettekening] if [stap2-energielabel-woning-opname-oppervlakte] equals ""
                            and if [stap2-energielabel-woning-opname-bouwtekeningen] equals ""
    

    But your actual select element looks like this:

    [select stap2-energielabel-woning-opname-bouwtekeningen "Dat weet ik niet" "Jazeker!" "Nee, helaas"]
    

    So the value "" is per definition an unreachable value.

    Hence: if [stap2-energielabel-woning-opname-bouwtekeningen] equals "" will always be FALSE.

    Thread Starter tasmara0105

    (@tasmara0105)

    That’s what I’m trying to tell you. If I save the form. It deletes the values I set.

    This is the code before I save the form

    show [prijs50m2mettekening] if [stap2-energielabel-woning-opname-oppervlakte] equals "<50m2"
                            and if [stap2-energielabel-woning-opname-bouwtekeningen] equals "Jazeker!"
    show [prijs50m2zondertekening] if [stap2-energielabel-woning-opname-oppervlakte] equals "<50m2"
                               and if [stap2-energielabel-woning-opname-bouwtekeningen] equals "Nee, helaas"
    show [prijs50-150m2mettekening] if [stap2-energielabel-woning-opname-oppervlakte] equals "50-150m2"
                                and if [stap2-energielabel-woning-opname-bouwtekeningen] equals "Jazeker!"
    show [prijs50-150m2zondertekening] if [stap2-energielabel-woning-opname-oppervlakte] equals "50-150m2"
                                   and if [stap2-energielabel-woning-opname-bouwtekeningen] equals "Nee, helaas"
    show [prijs150-300m2mettekening] if [stap2-energielabel-woning-opname-oppervlakte] equals "150-300m2"
                                 and if [stap2-energielabel-woning-opname-bouwtekeningen] equals "Jazeker!"
    show [prijs150-300m2zondertekening] if [stap2-energielabel-woning-opname-oppervlakte] equals "150-300m2"
                                    and if [stap2-energielabel-woning-opname-bouwtekeningen] equals "Nee, helaas"
    show [prijs300-500m2mettekening] if [stap2-energielabel-woning-opname-oppervlakte] equals "300-500m2"
                                 and if [stap2-energielabel-woning-opname-bouwtekeningen] equals "Jazeker!"
    show [prijs300-500m2zondertekening] if [stap2-energielabel-woning-opname-oppervlakte] equals "300-500m2"
                                    and if [stap2-energielabel-woning-opname-bouwtekeningen] equals "Nee, helaas"
    show [prijs500m2mettekening] if [stap2-energielabel-woning-opname-oppervlakte] equals ">500m2"
                             and if [stap2-energielabel-woning-opname-bouwtekeningen] equals "Jazeker!"
    show [prijs500m2zondertekening] if [stap2-energielabel-woning-opname-oppervlakte] equals ">500m2"
                                and if [stap2-energielabel-woning-opname-bouwtekeningen] equals "Nee, helaas"

    After saving what you saw in the example happens. the saving of the form makes this happen time and time again.

    Plugin Author Jules Colle

    (@jules-colle)

    Oh I see, sorry about the misunderstanding ??

    I’ll look into it, probably a bug related to the superscript characters.

    Plugin Author Jules Colle

    (@jules-colle)

    This seems to work, though?
    https://conditional-fields-cf7.bdwm.be/form-tester/?hash=3b6bbc5b133f2c6fdcb5d6579ca96c7f

    Are the conditions only removed on your own site, or also in the form tester?

    Thread Starter tasmara0105

    (@tasmara0105)

    I added the code to the form tester and it works there, but on my website when I save the form in the plugin in the exact same way as in the form tester it deletes most of the conditions and empties the values.

    Thread Starter tasmara0105

    (@tasmara0105)

    I put in

    show [energielabel-group] if [stap1-aanvraag] equals "Een energielabel voor één adres"
    show [energielabels-group] if [stap1-aanvraag] equals "Energielabels voor meerdere adressen"
    show [anderedienst-group] if [stap1-aanvraag] equals "Een andere dienst"
    show [energielabel-woning-group] if [stap2-energielabel-soortgebouw] equals "Woning"
    show [energielabel-bedrijfsgebouw-group] if [stap2-energielabel-soortgebouw] equals "Bedrijfsgebouw"
    show [energielabel-bedrijfsgebouw-group] if [stap2-energielabel-soortgebouw] equals "Combinatie woning/bedrijfsgebouw"
    show [tenaamstelling-particulier-group] if [stap3-offerte-tenaamstelling] equals "Aan een particulier persoon"
    show [tenaamstelling-bedrijf-group] if [stap3-offerte-tenaamstelling] equals "Aan een bedrijf of instelling"
    show [particulier-afwijkend-adres-group] if [stap1-aanvraag] equals "Een energielabel voor één adres"
                                         and if [stap3-particulier-gelijk-adres] equals "Nee"
    show [particulier-afwijkend-adres-group] if [stap1-aanvraag] not equals "Een energielabel voor één adres"
    show [bedrijf-afwijkend-adres-group] if [stap1-aanvraag] equals "Een energielabel voor één adres"
                                     and if [stap3-bedrijf-gelijk-adres] equals "Nee"
    show [bedrijf-afwijkend-adres-group] if [stap1-aanvraag] not equals "Een energielabel voor één adres"
    show [particulier-gelijk-adres-group] if [stap3-particulier-gelijk-adres] equals "Ja"
    show [bedrijf-gelijk-adres-group] if [stap3-bedrijf-gelijk-adres] equals "Ja"
    show [prijs50m2mettekening] if [stap2-energielabel-woning-opname-oppervlakte] equals "<50m2"
                            and if [stap2-energielabel-woning-opname-bouwtekeningen] equals "Jazeker!"
    show [prijs50m2zondertekening] if [stap2-energielabel-woning-opname-oppervlakte] equals "<50m2"
                               and if [stap2-energielabel-woning-opname-bouwtekeningen] equals "Nee, helaas"
    show [prijs50-150m2mettekening] if [stap2-energielabel-woning-opname-oppervlakte] equals "50-150m2"
                                and if [stap2-energielabel-woning-opname-bouwtekeningen] equals "Jazeker!"
    show [prijs50-150m2zondertekening] if [stap2-energielabel-woning-opname-oppervlakte] equals "50-150m2"
                                   and if [stap2-energielabel-woning-opname-bouwtekeningen] equals "Nee, helaas"
    show [prijs150-300m2mettekening] if [stap2-energielabel-woning-opname-oppervlakte] equals "150-300m2"
                                 and if [stap2-energielabel-woning-opname-bouwtekeningen] equals "Jazeker!"
    show [prijs150-300m2zondertekening] if [stap2-energielabel-woning-opname-oppervlakte] equals "150-300m2"
                                    and if [stap2-energielabel-woning-opname-bouwtekeningen] equals "Nee, helaas"
    show [prijs300-500m2mettekening] if [stap2-energielabel-woning-opname-oppervlakte] equals "300-500m2"
                                 and if [stap2-energielabel-woning-opname-bouwtekeningen] equals "Jazeker!"
    show [prijs300-500m2zondertekening] if [stap2-energielabel-woning-opname-oppervlakte] equals "300-500m2"
                                    and if [stap2-energielabel-woning-opname-bouwtekeningen] equals "Nee, helaas"
    show [prijs500m2mettekening] if [stap2-energielabel-woning-opname-oppervlakte] equals ">500m2"
                             and if [stap2-energielabel-woning-opname-bouwtekeningen] equals "Jazeker!"
    show [prijs500m2zondertekening] if [stap2-energielabel-woning-opname-oppervlakte] equals ">500m2"
                                and if [stap2-energielabel-woning-opname-bouwtekeningen] equals "Nee, helaas"

    and get stuck with

    show [energielabel-group] if [stap1-aanvraag] equals "Een energielabel voor één adres"
    show [energielabels-group] if [stap1-aanvraag] equals "Energielabels voor meerdere adressen"
    show [anderedienst-group] if [stap1-aanvraag] equals "Een andere dienst"
    show [energielabel-woning-group] if [stap2-energielabel-soortgebouw] equals "Woning"
    show [energielabel-bedrijfsgebouw-group] if [stap2-energielabel-soortgebouw] equals "Bedrijfsgebouw"
    show [energielabel-bedrijfsgebouw-group] if [stap2-energielabel-soortgebouw] equals "Combinatie woning/bedrijfsgebouw"
    show [tenaamstelling-particulier-group] if [stap3-offerte-tenaamstelling] equals "Aan een particulier persoon"
    show [tenaamstelling-bedrijf-group] if [stap3-offerte-tenaamstelling] equals "Aan een bedrijf of instelling"
    show [particulier-afwijkend-adres-group] if [stap1-aanvraag] equals "Een energielabel voor één adres"
                                         and if [stap3-particulier-gelijk-adres] equals "Nee"
    show [particulier-afwijkend-adres-group] if [stap1-aanvraag] not equals "Een energielabel voor één adres"
    show [bedrijf-afwijkend-adres-group] if [stap1-aanvraag] equals "Een energielabel voor één adres"
                                     and if [stap3-bedrijf-gelijk-adres] equals "Nee"
    show [bedrijf-afwijkend-adres-group] if [stap1-aanvraag] not equals "Een energielabel voor één adres"
    show [particulier-gelijk-adres-group] if [stap3-particulier-gelijk-adres] equals "Ja"
    show [bedrijf-gelijk-adres-group] if [stap3-bedrijf-gelijk-adres] equals "Ja"
    show [prijs50m2mettekening] if [stap2-energielabel-woning-opname-oppervlakte] equals ""
                            and if [stap2-energielabel-woning-opname-bouwtekeningen] equals ""
    show [prijs50m2zondertekening] if [stap2-energielabel-woning-opname-oppervlakte] equals ""
                               and if [stap2-energielabel-woning-opname-bouwtekeningen] equals "Jazeker!"
    show [prijs500m2zondertekening] if [stap2-energielabel-woning-opname-oppervlakte] equals ">500m2"
                                and if [stap2-energielabel-woning-opname-bouwtekeningen] equals "Nee, helaas"

    after saving the form

    Plugin Author Jules Colle

    (@jules-colle)

    I was able to reproduce this bug. It is related to the less than sign: <
    It does work (once) if you change < to &lt;

    But if you save the form again after that the same problem occurs.

    As a temporary work-around you could change < to another character or phrase like "minder dan 50m2"

    But this is definitely a bug in the plugin and will get fixed with highest priority. (making this sticky to follow up)

    Thread Starter tasmara0105

    (@tasmara0105)

    Ok I’ve changed the text for now. Let me know when the bug is fixed. Then I can change it back ??

    Thanks for your help

    Plugin Author Jules Colle

    (@jules-colle)

    Should be fixed in version 2.0.1

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Conditions not being saved’ is closed to new replies.