We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This content type has a TextLine input with a default value and min 3 occurrences (which means they should be created automatically).
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <content-type> <display-name>Test</display-name> <super-type>base:structured</super-type> <form> <input name="field1" type="TextLine"> <label>Field 1</label> <occurrences minimum="3" maximum="3"/> <default>Default text</default> </input> </form> </content-type>
In Content Studio it's rendered correctly (correct number of fields with the default value):
But the content is created with wrong data (only one occurrence of field1):
field1
"data": { "field1": "Default text" },
After first save data becomes correct:
data
"data": { "field1": [ "Default text", "Default text", "Default text" ] },
This is also a problem with container inputs (like item-sets) that have several occurrences.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <content-type> <display-name>ItemSet</display-name> <super-type>base:structured</super-type> <form> <input name="field1" type="TextLine"> <label>Field 1</label> <occurrences minimum="1" maximum="1"/> <default>Default text</default> </input> <item-set name="field2"> <label>Field 2</label> <items> <input name="label" type="TextLine"> <label>Label</label> <occurrences minimum="1" maximum="1"/> <default>Default text</default> </input> </items> <occurrences minimum="3" maximum="3"/> </item-set> </form> </content-type>
Content Studio:
Wrong data on create (only one occurrence of field2):
field2
"data": { "field1": "Default text", "field2": { "label": "Default text" } },
Correct data after save:
"data": { "field1": "Default text", "field2": [ { "label": "Default text" }, { "label": "Default text" }, { "label": "Default text" } ] },
The text was updated successfully, but these errors were encountered:
Default values are not correctly set for inputs with several occurren…
2ea85bd
…ces on content create #8737
ee7b31c
f233b95
dc6171f
3d06311
15b2da9
anatol-sialitski
No branches or pull requests
This content type has a TextLine input with a default value and min 3 occurrences (which means they should be created automatically).
In Content Studio it's rendered correctly (correct number of fields with the default value):
But the content is created with wrong data (only one occurrence of
field1
):After first save
data
becomes correct:This is also a problem with container inputs (like item-sets) that have several occurrences.
Content Studio:
Wrong
data
on create (only one occurrence offield2
):Correct
data
after save:The text was updated successfully, but these errors were encountered: