Hi Ananya,
Saying you want the user to select a particular country do you mean using List or Select component?
The code should be added on Button Click event.
Hi Ananya,
Saying you want the user to select a particular country do you mean using List or Select component?
The code should be added on Button Click event.
YEss... unless he doesnt select a country he is not allowed to proceed....
pls help me with that code!.
this event i added on page load
flag = Appery("mobiletextinput_1").attr("value") === "" & Appery("mobiletextinput_2").attr("value") === "" & Appery("mobiletextinput_3").attr("value") === "";
and the other code i added this too on d same page load
if (flag === true){
Appery("mobilebutton_211").removeClass("ui-disabled");
} else {
Appery("mobilebutton_211").addClass("ui-disabled");
}
is this correct?
Hi Ananya,
You can use the following code to get Select component value:
codevar selected = Appery("mobileselectmenu_28").find(":selected").attr("value");/code
After that, you can insert it into the empty string check (or another one).
Regarding the correctness of the code insertion, it depends on when you need to perform this check ... If on page load - then add it to Page Load event, if on button click - then use Button click event.
Sorry i still didnt get it..... i tried it on page load but it just checks the value when the page is loaded n not later on when all the fields are entered.....pls give me a solution such that i can use the above code to validate my form so that it also checks when all the fields are entered a value....
The layout of my project is
at first since all the fields are empty i want the submit button's UI to be disabled and then after all the values and the countries selection is made i want the of the Submit button to be Enabled... PLs tell me where i should put which code so as to validate my form,
Hi Ananya,
Then you should place the validation code in custom JavaScript separate function, and call it on Value change event for each component.
What u r saying is
flag = Appery("mobiletextinput_1").attr("value") === "" & Appery("mobiletextinput_2").attr("value") === "" & Appery("mobiletextinput_3").attr("value") === "";
must be placed on each inputbox on valu change?
var selected = Appery("mobileselectmenu_28").find(":selected").attr("value");
this must be placed on the select menu on value change?
and
if (flag === true){
Appery("mobilebutton_211").removeClass("ui-disabled");
} else {
Appery("mobilebutton_211").addClass("ui-disabled");
} must be made into a customJS right?
did i get the order correct this time on where what code must be placed?
Hello! Create JS asset with code:
prefunction checkForm() {
var flag = (Appery("mobiletextinput_1").val() !== "") && (Appery("mobiletextinput_2").val() !== "") && (Appery("mobiletextinput_3").val() !== "");
var selected = Appery("mobileselectmenu_28").find(":selected").val() !== "";
if (flag && selected) {
Appery("mobilebutton_211").removeClass("ui-disabled");
} else {
Appery("mobilebutton_211").addClass("ui-disabled");
}
}/pre
On Input and Select value change events add code:
precheckForm();/pre
I posted by mistake ![]()
Hello Everyone,
in fact I do a question.
1/ i made the db table with records,
2/ i'd like to use the select menu,
3/ how do you populate this select menu ?
I tried few things in mapping fiels to selectMenu control and nothing work so far.
thk you in advance,
Eric
Hi,
Please check here:
http://devcenter.appery.io/documentat...