I have four date fields.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2024 02:20 AM
I have four date fields on my catalog form. I have four fields in two pairs i.e. Week start date & Week end date as one pair, normal start date and normal end date as second pair.
Now I want to validate, atleast one pair of date is selected before submitting the form.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2024 02:50 AM
Hello,
I want to validate from given four date fields , atleast one pair of date fields are having value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2024 02:52 AM
what do you mean by validate? Do you want to check if these fields have a value, do you wan to check end date is after start, do you want ti check if the date is in past or not.
Validate is pretty open ended and if you want right answer you have to explain the ask.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2024 03:07 AM
I want to validate if there is value in the field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2024 03:15 AM
I want to check if the user has filled any of the two pair of dates field (consider field A & field B is one pair ) (field -C & field -D are one pair) , now i want user to enter any of the pair to be filled. If not entered then don't allow users to submit catalof form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2024 06:15 AM
in the on submit client script you can add something like below
if((g_form.getValue('<startDate1>') == '' && g_form.getValue('endDate1>') == '') || (g_form.getValue('<startDate2 >') == '' && g_form.getValue('endDate2 >') == ''));
{
//alert('throw error');
return false;
}
Add proper field variables names in the if.