HI
Im struggling to get my if function working, when the client fills out the form and forget to fill out this time picker i want it to return the message.
else if ($w("meal1timePicker").selectedIndex !== undefined) {
Only the section after the string is the issue the value part
($w("meal1timePicker"). "Something something here
Works for all other types of boxes no issues but for the time picker it seems to want something else to make it work?
function checkMealplan() {
if($w("#emailClientrichText").value == "") {
$w("#validationMessagetext").text = "Hi! you need to fill out the comments to the client on slide 1"
$w("#validationMessagetext").show("fade",fadeOption)}
else if ($w("meal1timePicker").selectedIndex !== undefined) {
$w("#validationMessagetext").show("puff",puffOption)
$w("#validationMessagetext").text = "No time set in meal 1!";}
else if ($w("#mealTypedropdown").value == "") {
$w("#validationMessagetext").show("puff",puffOption)
$w("#validationMessagetext").text = "No meal type set in meal 1!";}
else {
$w("#validationMessagetext").text = "Check completed & all fields are good & data will be now be submitted!";
console.log("Check completed & all fields are good & data will be now be submitted!")// If FALSE what to do
}
}
I’ve tried many different variations none seem to work. including these
else if ($w("meal1timePicker").value !== '') {
else if ($w("meal1timePicker").value.length < 1) {
Any ideas?
Thanks
Dan