I am using ColdFusion to create a dynamic form based on the results of a database query. The form lists assets that are available to book on a project. Users then book as many of the assets as they want by selecting a start and end date for each asset from a popup calendar (each asset can have different start/end dates).
Upon clicking the Submit button I need to validate each pair of dates for the following:
1.
Ensure that both a start and end date were entered for each asset (it’s OK if both start/end are blank, just not one or the other)
Ensure that the end date of the pair is not earlier than the start date.
I don’t have hard-coded field names because I don’t know the size of the query. Therefore each start date field is named [FONT=courier new]#q_listing.identifier_id#_start[/FONT] and each end date field is named [FONT=courier new]#q_listing.identifier_id#
I’m just not sure how to get the dynamic field names into JS validation so that it compares the correct pair values.
Any ideas? Thanks a bunch in advance!!