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.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | crm_core_profile-message.patch | 1.84 KB | franz |
| crm_core_profile-message.patch | 2.3 KB | franz | |
| crm_core_profile-message-with-update.patch | 2.74 KB | franz |
Comments
Comment #1
xcf33 commentedOnly 2 concerns
we need
1. check_plain on the message
2. a data type of varchar(255) is too short for a redirect message?
Comment #2
franz1 - Using t() as it runs check_plain() and also adds translation support.
2 - Increased to 512.
Comment #3
franzt() was just stupid, used check_plain() and committed.