In researching a problem I was having, I noticed a few improvements that could be made to the webform_client_form() function:

1. The element $form['details']['page_count'] is set twice.

2. The elements $form['details']['email_subject'], email_from_name, and email_from_address are set but never used. These values are re-read from the database during submit.

3. $form['details']['sid'] is passed to validate/submit using a hidden, when a "value" would suffice (and mean a few less bytes being sent to the browser.)

Here's a patch.

Comments

quicksketch’s picture

Status: Needs review » Fixed
StatusFileSize
new661 bytes

All of theses fixes have been added to the 3.x branch, though I've only removed the duplicate $form['details']['page_count'] in the 2.x branch to prevent any sort of API breakage.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.