1

Currently I have a table of records webform (The node identifier of a webform) and a list of users, Associated with the webform table nid The group has kept a list of users webform's (The node identifier of a webform).

The purpose is to be in accordance with a different view webform to fill a single page, you can automatically bring out the webfrom belong to fill a single page to view a list of users group, the following screen embedded in it, and you want to automate the dynamic select options each webforms seperately, That each webform node page has a list of dynamic select options users group.

If the user fills again webform view to fill a single page, select a person of a certain list of users, and finally to be able to produce the data stored. To record the value webfrom submit sid and webform nid and selected personnel.

How do I make it?

1 Answer 1

0

I don't entirely understand your question, but I believe that you want to customize a webform based on the user currently logged in.

To do this you can use hook_form_alter.

All webform have an ID that starts webform_client_form_ so you check check for this, and then make any modification as necessary.

E.g:

function MY_MODULE_form_alter(&$form, &$form_state, $form_id) {

    //drupal_set_message("Form ID is : " . $form_id);

    if(substr($form_id, 0, 20)=='webform_client_form_') {

        global $user;

        // make changes to form here

    }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.