-
Hi,
They must then enter the first 2 letters of the location that has already been entered in the database. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
well ... currently it is not possible directly. You could create own javascript and check for the value of the hidden location_id field ... |
Beta Was this translation helpful? Give feedback.
-
There was already an (undocumented) filter to validate event data when creating an event (now it is documented). So I added a similar filter eme_fs_validate_event_filter too (in dev code). There you can add your own logic. |
Beta Was this translation helpful? Give feedback.
-
I already use eme_fs_event_insert_filter. How the two filters will work together? |
Beta Was this translation helpful? Give feedback.
-
I have tested, but something is wrong in my filter, because the fs event is validate even if I don't choose in the list and put in any letter. My test must be wrong ! function my_fs_validate_event_filter($event){
$mytexte="";
if ($event['location_id']==NULL){
$mytexte="Vous devez choisir votre voilier dans la liste";
}
return $mytexte;
}
add_filter('eme_fs_validate_event_filter','my_fs_validate_event_filter'); Could you help me? |
Beta Was this translation helpful? Give feedback.
if (empty($event['location_id'])) {
should do it.