GMgKe586q6suSQnyqZLlGCooeWM

Pages

Search

Friday, February 18, 2011

Message In Drupal

It's easy to make message in drupal. If your form function is data_form($form, &$form_state), so your submit function is data_form_submit($form, &$form_state). What's the point? The point is that you add "_submit" on the for function for your submit function. Look this  code

// form function
function data_form( $form, &$form_state){
    // implement codes
}

// form submit function
function data_form_submit( $form, &$form_state){
    drupal_set_message( t('Your data has been saved successfully') );
}
Share/Bookmark

No comments:

Post a Comment