Hi @praveengeorgeix i have a similar issue but i am very new to Javascript and i dont know where/ how to start. If you can help me out,
How should i create the ‘showdate’?
where do i copy the above code to?
You can place it anywhere in the survey.
I pasted in the first question javascript area.
Hi @praveengeorgeix thanks for the quick response.
I am completely new to all this. I don’t exactly understand what to do. If you could please explain step by step what i should do and please know that i have no experience with embedded logics etc.
I think it’s best if i provide some context to my form so that it gives you a visual look on how my form looks like and how you can help me resolve this.
My survey is a conference support registration form and its about 8questions all in one block. On the 6th question, users will enter the date they will be attending a conference. If the date they enter is less than 30days from the current date they are completing the form, i want the form to terminate.
What do i do first please?
As a first mandatory stem create 2 variables in embedded data.
ConferenceDate
screenOut
Both variables are case sensitive.
Then change the variable type as below from options in right corner of green box.
What do you mean by terminate.
I’m stuck on the “Then change the variable type as below from options in right corner of green box.” Where did you go to get that Options menu?
Also to terminate mean i want to the survey to end for the user.
You need to change the Q7 and Q8 to a different block
and add a stop node based on branch as below.
This should work. I can see an error. I need to log out now. The foundation is correct.
Hi @praveengeorgeix I’m not sure if i did the right thing so please see below.
If i understood you correctly, are you suggesting i change my previous question 8 from my screenshot( which was a text entry question type) to the screen shot you sent ( which is a the form field question type). I am unsure if you want me to change that question type or create a new question. Please clarify that for me.
Anyway i went ahead to change the question type into a form field. After that, I copied the codes you sent over into the Javascript and saved.
That is what i have so far, kindly prompt me if it follows the logic you explained.
Also, I don’t understand what you mean by “You need to change the Q7 and Q8 to a different block”. Which question are you referring to as Q7? Also, do you mean i create a new block and move my Q8 into it?? Please clarify this statement.
However i have tested it but it is not working. When testing i entered todays date 11/17/2023 hoping the survey will end but i still kept going.
Below is screenshot of what my survey flow currently looks like