Page 1 of 1

Making sure user checks the box prior to submission

Posted: Sun Jun 21, 2015 12:47 pm
by Konstantin

OK, one last thing before I am publish my app :)

My users rank an item and click submit button and the ranking gets stored in a DB. How do I make sure that they check the button prior to clicking "submit"? Also, how do I do a similar verification on the text in a check box. Right now the submit button functions regardless of whether the box is checked or not. Please help. Thanks.


Making sure user checks the box prior to submission

Posted: Sun Jun 21, 2015 4:25 pm
by Alena Prykhodko

Hello,

Please look here how to add such statement https://getsatisfaction.com/apperyio/..., then you can execute needed service https://devcenter.appery.io/documenta...


Making sure user checks the box prior to submission

Posted: Mon Jun 22, 2015 10:08 pm
by Konstantin

This is not what I need. My users can search for an item. I mapped my checkbox in such a way that it displays what the user has searched fro (from the DB) and I am asking a user to check the box, rank the item (from a drop down menu) and click submit button. Right now the submit button works regardless of whether the checkbox is checked or what the text in the checkbox says. I would like to:
1) execute a script to make sure the checkbox is checked and
2) the text of the checkbox is not null

Only then I would like the service to execute. Please help. Thanks.


Making sure user checks the box prior to submission

Posted: Tue Jun 23, 2015 6:50 am
by Alena Prykhodko

Konstantin,

You need to add these statements, this is standard JavaScript code. This should be useful https://devcenter.appery.io/documenta...
We are very sorry, but custom code is something outside the scope (http://devcenter.appery.io/support-po...) of our support.


Making sure user checks the box prior to submission

Posted: Tue Jun 23, 2015 4:06 pm
by Konstantin

This is the solution, but it has to include the id of the checkboxgroup, not a single check box. Ugghhhh...

var checkboxValue = $('input[name=mobilecheckboxgroup]').is(':checked');

if (checkboxValue === true){

alert ("true");// returns true when checked

}else{

alert ("false");//returns false when unchecked

}


Making sure user checks the box prior to submission

Posted: Wed Jun 24, 2015 12:33 pm
by Serhii Kulibaba

Sorry, do you need further assistance?


Making sure user checks the box prior to submission

Posted: Wed Jun 24, 2015 5:23 pm
by Konstantin

no, it has been resolved