Providing that we already have an option to redirect to any given path after form submission, it's perfectly reasonable to have an option to also display a friendly confirmation message too. My patch accomplishes this the same way as "redirect" attribute, by adding a new field in DB schema, so I've added a convenience "hook_update_N" patch which doesn't need to be committed as there is on stable version yet.

On second thoughts, though, I believe we should have a column for serialized data on DB, so that any other attributes (provided or extended by other modules) can easily be saved. Settings like "redirect" and "message" are good examples of attributes that do not require a DB column for each and could be stored in a single "settings" array.

Comments

xcf33’s picture

Only 2 concerns

we need

1. check_plain on the message
2. a data type of varchar(255) is too short for a redirect message?

franz’s picture

StatusFileSize
new1.84 KB

1 - Using t() as it runs check_plain() and also adds translation support.
2 - Increased to 512.

franz’s picture

Status: Needs review » Fixed

t() was just stupid, used check_plain() and committed.

Status: Fixed » Closed (fixed)

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