drupal - Get out an error message if noone of checkboxes selected -


i have set checkboxes form works perfect, have if statement works perfect want when user hasn't selectected checkbox list, when pushes save button out drupal error says "oh!you not select nothing"... how can thing?

if (!$selected) {   drupal_set_message(t('you have select @ least 1 option list.'), 'warning'); } 

you can set message manually code:

https://api.drupal.org/api/drupal/includes!bootstrap.inc/function/drupal_set_message/7

where have if logic add drupal_set_message() call.


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -