I have the following setup
- Drupal 6.x
- Webform 6.x - 3.17
- reCAPTCHA 6.x - 1.17
I also have the following custom module
function webform_to_data_repo_form_alter(&$form, &$form_state, $form_id)
{
if ($form_id == 'webform_client_form_765')
{
$form['#action'] = url('some-external-site.com', array('external' => true));
$form['#method'] = 'post';
}
}
As it is now, the form is able to communicate with the external website. It cannot however validate entered values before it submits.
This lack of validation is a problem for several reasons because
- The CAPTCHA field can be left blank, which defeats its purpose.
- Any field that I specifically made mandatory can now be left blank, again defeating its purpose.
I've also read on multiple occasions that once you use $form['#action']
, any attempts on validation will cease to work.
I was wondering if there was a way I could prioritize the validation of forms over $form['#action']
and if so, how?
If you could just point me to the right direction, in terms of what my custom module is missing, I'd appreciate it.
Thanks in advance.