Add an action While Click on Save Button
Hello Forum;
Maybe my question might have been asked before but I am newbie. I have a Skybow list form. In my Default New Form
Let's say I have fields like A,B,C . These fields types are "Choice" and Checkbox. I have not set their "default values"
My users may click A field OR B field OR C at the same time. OR They may only click C field.
so What I want to put an action while only saving button that They have to click at least A or B or C. They must not save the form without choosing A or B or C (At least1 field has to be clicked)
How can I write this function and inform user with a warning message while click "Save" button
-
0
-
Hi cem tugrul
Since the Choice field placeholders returns text strings you can check for empty string values: [[Choice1]]!==""
In your use case you can add an additional Show Message action to your Save button.
Add a Condition like this on your Save Form (and Redirection) action for execution when at least one option is selected:
=[[Choice1]]!=="" || [[Choice2]]!=="" || [[Choice3]]!=="" || [[Choice4]]!=="" || [[Choice5]]!==""
Add a Condition like this on your Show Message action for execution when no options are selected (opposite of other Condition expression) :
=!([[Choice1]]!=="" || [[Choice2]]!=="" || [[Choice3]]!=="" || [[Choice4]]!=="" || [[Choice5]]!=="")
Hope this helps.
Best regards,
Christof
0 -
Hello Christof,
thank you very much for feedback but it is not working. I mean My form still saving the form if 5 of my fields are whole empty(Null) means (at least 1 department is not selected)
0 -
and the Message from your Show Message action is shown?
0 -
No Show message action shown
0 -
You probably swapped the Conditions on the actions? Can you try to switch them?
0 -
!([[_x0130__x015f_Haz_x0131_rlamaNor0]]!== "" || [[_x00dc_retimNormBolum_x0020_Seci]]!== "" || [[LojistikNormBolum_x0020_Secimi]]!== "" || [[TeknikNormBolum_x0020_Secimi]]!== "" || [[KaliteNormBolum_x0020_Secimi]]!== "")
Now it works :-) I have just used "!" instead of "=!" at the beginning of the syntax
0 -
Warning message comes to screen BUT still saves the form When all the choice fields are NULL (nothing selected)
What is my fault?
0 -
what's your Condition expression on that Save form action?
0 -
0
-
!([[_x0130__x015f_Haz_x0131_rlamaNor0]]!== "" || [[_x00dc_retimNormBolum_x0020_Seci]]!== "" || [[LojistikNormBolum_x0020_Secimi]]!== "" || [[TeknikNormBolum_x0020_Secimi]]!== "" || [[KaliteNormBolum_x0020_Secimi]]!== "")
0 -
I do not understand why we use "||" This is "OR" logical so Don't we have to use "&&" And operator. Because IF all of my 5 fields are NULL at the same time so this should have meaned that my user did not select at least 1 department.
0 -
-
0 -
At once its working because there mandotary fields "can not blank" But When I filled up these fields then Without selection for my last 5 fields it is saving the form :-)
0 -
with ! in front it's negotiated and needs the || "OR".
Here you sent the Condition expression of the Show Message action. I asked for the Condition expression of the Save action.
Since this should be exactly the opposite check (different expression checks for the other case). Please check my first answer in this post, where I describe which expression you have to use for Save action and which expression for the Show Message action to get the desired result (notice: two different expression are used!).0 -
There must a be another condition While save form;
0 -
[[_x0130__x015f_Haz_x0131_rlamaNor0]]!=="" && [[_x00dc_retimNormBolum_x0020_Seci]]!=="" && [[TeknikNormBolum_x0020_Secimi]]!=="" && [[KaliteNormBolum_x0020_Secimi]]!=="" && [[LojistikNormBolum_x0020_Secimi]]!==""
means 5 fields can not be NULL at the same time THEN user may "Save" my form
0 -
My final Conditions as below;
For Show Message;
!([[_x0130__x015f_Haz_x0131_rlamaNor0]]!== "" || [[_x00dc_retimNormBolum_x0020_Seci]]!== "" || [[LojistikNormBolum_x0020_Secimi]]!== "" || [[TeknikNormBolum_x0020_Secimi]]!== "" || [[KaliteNormBolum_x0020_Secimi]]!== "")
For Save Condition;
[[KaliteNormBolum_x0020_Secimi]]!=="" || [[LojistikNormBolum_x0020_Secimi]]!=="" || [[_x00dc_retimNormBolum_x0020_Seci]]!=="" || [[TeknikNormBolum_x0020_Secimi]]!=="" || [[_x0130__x015f_Haz_x0131_rlamaNor0]]!==""
0
Please sign in to leave a comment.
Comments
18 comments