[consulting] two registration form with two content profile and two role

Bhavin Joshi bhavinjosi at joshics.in
Mon Jun 28 08:12:19 UTC 2010


Please add a condition in the hook_validate that validates only
desired form fields only.
You can also write the validate function as $form['#validate'] =
array(<your validate function>), which increases the readability.
In addition, you should write the function in following way

foreach
($form['#content_profile_registration_use_types'] as $type =>
$typename) {
if(arg(1) == 'serviceprovider')
{
$type = 'service_provider';
drupal_get_form('content_profile_registration_add_profile_form',
$type, $form, $form_state);
}
if(arg(1) == 'affiliate')
{
$type = 'affiliate';
drupal_get_form('content_profile_registration_add_profile_form',
$type, $form, $form_state);
}
}




--
Bhavin H. Joshi

Web: http://joshics.in
Get your tiny URL: http://ly2.in
Portfolio: http://sites.google.com/site/bhavinhjoshi/portfolio


More information about the consulting mailing list