Sorry, I do not recall which issue fixed this problem for the 'submit' and 'form_id' elements of the form, but it forgot the 'reset' button.

Please, see attached patch. It also removes global $form_values; (note it is accessed through the $GLOBALS array) and adds a couple of comments to remind why certain form elements need to be unset.

Comments

chx’s picture

Status: Active » Needs work

this does not belong to form API IMO.

markus_petrux’s picture

Sure, but there's already code in place to filter 'submit' and 'form_id':

unset($GLOBALS['form_values']['submit'], $GLOBALS['form_values']['form_id']);

Searching (probably better than when initially opened this issue) I've found this:
http://drupal.org/node/41170

markus_petrux’s picture

StatusFileSize
new741 bytes

Patch re-rolled.

If it has not to be fixed somewhere else, current approach is incomplete. 'reset' still gets saved to the variable table. This patch would fix that.

markus_petrux’s picture

Status: Needs work » Needs review
markus_petrux’s picture

Aha! It's been bumped by the automatic close. I was looking for it as reference here:
http://drupal.org/node/46255

The patch proposed in this issue just follows what's been done by #46255

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community
markus_petrux’s picture

As far as I can see, the patch still applies.

chx’s picture

Still. Why not system_settings_form_submit ? I remove submit and form_id because these are very common and it's simpler this way but that reset is very form specific.

markus_petrux’s picture

I think it's easy if all this stuff is coded in the same place. No matter where, IMO.

chx’s picture

petty matter. does not worth the time. please commit this.

markus_petrux’s picture

I believe the patch in comment #3 still applies. Please, let me know if it doesn't.

This is trivial. It's just aimed to complete something that if it should be changed, well, how exactly? so we could work out a different solution.

Otherwise, 'reset' is still saved into the variables table...

markus_petrux’s picture

StatusFileSize
new657 bytes

Patch re-rolled.

markus_petrux’s picture

Note that I'm removing global $form_values;. It is accessed via $GLOBALS.

killes@www.drop.org’s picture

Status: Reviewed & tested by the community » Fixed

applied.

Anonymous’s picture

Status: Fixed » Closed (fixed)