The drop is always movingYou know that saying about standing on the shoulders of giants? Drupal is standing on a huge pile of midgetsAll content management systems suck, Drupal just happens to suck less.Popular open source software is more secure than unpopular open source software, because insecure software becomes unpopular fast. [That doesn't happen for proprietary software.]Drupal makes sandwiches happen.There is a module for that

form identity theft

Submitted by nk on Sat, 2009-12-26 11:29

I have created a rather complicated form to be submitted to search/location. There are two ways to do this, grab the search location form and alter it or if you need to do lots of fancy AJAX stuff which require a vastly different form structure, just recreate it and the lie to Drupal about which form it is -- in other words, steal the identity of search_form. You only need two lines of code in a form_alter (you can't do this in form generation as form_id gets overwritten unconditionally).

  $form['form_id']['#value'] = 'search_form';
  $form['form_token']['#default_value'] = drupal_get_token('search_form');

Commenting on this Story is closed.

Submitted by chanel (not verified) on Thu, 2010-09-16 09:34.

it is a nice day