Page 1 of 1

Conditions on an editbox in a form dont work.

Posted: Wed Feb 10, 2021 12:38 pm
by jjq2r01h
I have a problem with a form I have created. The form is at https://hanumanchalisa4cruk.org/
The conditions I have specified on checkbox2 object work perfectly well.
However, the conditions I have specified on editbox12 dont work at all. I would like that when the value of editbox12 < 50 then hide checkbox2 and when the value of editbox12 > 50, then display checkbox2
I can upload the wbs file if need be but I dont know how.
Any help would be appreciated.
Many thanks / Jag

Re: Conditions on an editbox in a form dont work.

Posted: Wed Feb 10, 2021 12:41 pm
by Pablo
I cannot see what you have done based on the published page.
To be able able to help you, I need a (demo) project.

Related FAQ:
https://www.wysiwygwebbuilder.com/forum ... 10&t=82134

Note: I do not need the complete project. So, please remove everything from the project that is not relevant to your question.

Re: Conditions on an editbox in a form dont work.

Posted: Wed Feb 10, 2021 12:46 pm
by jjq2r01h
Many thanks for your msg. Here is a link to my project.

https://1drv.ms/u/s!Ajp8jGjiAz6ShpdAjv8 ... Q?e=dBMjJM

Jag

Re: Conditions on an editbox in a form dont work.

Posted: Wed Feb 10, 2021 1:57 pm
by Pablo
You cannot use 'greater than' and 'lesser than in the same condition, this will cause a conflict.

Code: Select all

if ($('#Editbox12').val() > 50 && $('#Editbox12').val() < 50)
{
         ShowObject('wb_Checkbox2', 0);
         ShowObject('wb_Checkbox2', 1);
}
Instead use 'else', which results in:

Code: Select all

if ($('#Editbox12').val() < 50)
{
   ShowObject('wb_Checkbox2', 0);
}
else
{
   ShowObject('wb_Checkbox2', 1);
}

Re: Conditions on an editbox in a form dont work.

Posted: Wed Feb 10, 2021 6:17 pm
by jjq2r01h
Thank you very much Pablo. That works great. I presume you just have to manually change the javascript after publishing the project.

I dont know much about creating websites but I dabble into it whenever we have events to raise money for charity.

Where is the best place to learn about creating websites and using your package?

Also, do you know of anybody (especially in India) who uses wysiwyg web builder to develop websites who I can hire perhaps to do some small developments?

Re: Conditions on an editbox in a form dont work.

Posted: Wed Feb 10, 2021 6:47 pm
by Pablo
You do not have to edit the code.
'else' is one of the available conditions.

So, instead using
'less than' and greater than'
use
'less than' and 'else'
Where is the best place to learn about creating websites and using your package?
- help (F1)
- tutorials : https://www.wysiwygwebbuilder.com/getting_started.html
- this forum