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# - ItextSharp font color issue in ver 5.5.4+ -

ios - retrievePeripherals deprecated in IOS7 how to substitude it with retrievePeripheralsWithIdentifiers -