Konstantin
Posts: 0
Joined: Wed Jun 10, 2015 2:38 pm

Making sure user checks the box prior to submission

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.

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Making sure user checks the box prior to submission

Hello,

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

Konstantin
Posts: 0
Joined: Wed Jun 10, 2015 2:38 pm

Making sure user checks the box prior to submission

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.

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Making sure user checks the box prior to submission

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.

Konstantin
Posts: 0
Joined: Wed Jun 10, 2015 2:38 pm

Making sure user checks the box prior to submission

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

}

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Making sure user checks the box prior to submission

Sorry, do you need further assistance?

Konstantin
Posts: 0
Joined: Wed Jun 10, 2015 2:38 pm

Making sure user checks the box prior to submission

no, it has been resolved

Return to “Issues”