When I change the text of the "submit" button in webform.module ('#value' => t('Submit'), lines 1224 & 1241) the text changes but the webform doesn't work anymore. I reported this already before I found out that it had to do with this change. What happens after changing the text (and after submitting a webform) is the following:

  • there is no confirmation message (the page reloads)
  • there is no error message
  • no entry is made in "results"
  • no E-Mail is sent
  • there is nothing in the logs

To sum it up: Nothing happens except a reload of the page.

Comments

quicksketch’s picture

Status: Active » Closed (duplicate)

Let's consolidate this issue into your feature request for the same thing: http://drupal.org/node/213724.

yan’s picture

Actually it's two things:

1) The module breaks when I change the text from "Submit" to "Send" in webform.module (bug)
2) It'd like to have the opportunity to change the submit button text without working in the code (feature request)

Am I wrong?

yan’s picture

Status: Closed (duplicate) » Active

I re-open this since I think the bug is a separated issue from the feature request. Although the feature request is about this, it should be possible to change the text manually without breaking the module.

quicksketch’s picture

Okay, it's fine that it fits in two separate categories. The solution will fix both problems so let's keep it in one place.

Changing the name of buttons is something that is not usually supported in situations where there are multiple buttons on the page. For example, you can't change the name of the word "Preview" on the node form through a form_alter(), because until Drupal 6, the name of the button is the same thing as the submitted value. Similar problems exist for "Delete" on node, user, or taxonomy forms, the "Vote" button in poll, "Preview" in comments, or dozens of other places in contributed modules. It's currently the way that Drupal 5 works.

The only easy way to get around it is to make the button text a setting and then retrieve it in every place where we check $_POST['op']. In Drupal 6 we'll be spared this trouble by the new $form_state['clicked_button'] variable.

quicksketch’s picture

Category: bug » feature
Status: Active » Fixed

This feature was added to the 2.x version of the module. Under "Webform advanced settings" you can now set a button title to submit the form.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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