[MGNLFORM-241]  Default text for non-mandatory form title should not be hard-coded in the template script Created: 09/Sep/14  Updated: 02/Dec/14  Resolved: 25/Nov/14

Status: Closed
Project: Magnolia Form Module
Component/s: field
Affects Version/s: 2.2.3, 2.2.4, 2.2.5, 2.2.6, 2.2.7
Fix Version/s: 2.2.9

Type: Bug Priority: Neutral
Reporter: Lars Fischer Assignee: Christoph Meier
Resolution: Fixed Votes: 0
Labels: maintenance, quickwin, support, uzh
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File form-dialog-screenshot.png    
Issue Links:
relation
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Release notes required:
Yes
Date of First Response:

 Description   

The "title" attribute of a form is always displayed though it is not mandatory in the dialog.

It should be possible to omit the title for a form.

See form.ftl

https://git.magnolia-cms.com/gitweb/?p=modules/form.git;a=blob;f=src/main/resources/form/components/form.ftl;h=6071da77d0b029bab105e1c5d0ac2cfa2f9bed2e;hb=HEAD

[#assign title = content.formTitle!page.title!page.@name]
<h1>${title}</h1>



 Comments   
Comment by Christoph Meier [ 25/Nov/14 ]

First i wanted to propose not to change the logic which renders the title of the form but adding a checkbox "omit title if empty" on the form-dialog.

However, the current description of the formTitle field tells: >> If empty title won't be shown <<
So instead of adding the checkbox (which also requires removing a property and adding a node with some properties to the configuration), i ensure that the title is renderd according to its description.

A title is only rendered if the field /modules/form/dialogs/form/form/tabs/tabMain/fields/formTitle has a value; otherwise nothing is displayed.
If a user wants to display the PageTitle he must enter it into the field of the form.

Comment by Christoph Meier [ 25/Nov/14 ]

The fix is on branch "MGNLFORM-245" (See http://git.magnolia-cms.com/gitweb/?p=modules/form.git;a=commit;h=46a103cbe7ce8c11acaad139fea01e96b3515a58)

Generated at Mon Feb 12 05:38:16 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.