I'm assuming there's quite an easy way round this problem, so apologies for making an 'issue' of it. However, I have not found a solution anywhere.

I basically want to know how I can add Javascript to the webform, as well as custom theming. They both require the same function name to be inserted in template.php, as per the documentation.

So to explain more, I want to have a textfield disable/enable depending on when a specific radio button in a group is selected.

I want to specify the id of the specific radio button, and then add some jquery to it (please let me know if there's a better way to do this).

To add the js:

function phptemplate_webform_form_NID ($form) {
  drupal_add_js(path_to_theme() . '/scripts/SCRIPT_NAME.js');
  return theme('webform_form', $form);
}

To theme the page:

function phptemplate_webform_form_NID ($form) {
  return _phptemplate_callback('webform_form_[node id here]', array('form' => $form));
}

Both return different things, so I am unsure how to use them together.

Any help?

Thanks...

Comments

quicksketch’s picture

Status: Active » Closed (fixed)

Support for custom theming or code is not provided in the Webform issue queue.