Search the FirstSpirit Knowledge Base
Hello,
I wonder if it is possible if the FS_LIST can be filled with a default entry. So if you use something like this:
<TEMPLATES source="sectiontemplates">
<TEMPLATE uid="st_mytemplate"/>
</TEMPLATES>
It would be great if the editor see a default entry when opening the dialog by clicking on "edit" in the ContentCreator.
Is that possible somehow?
kind regards and thanks in advance.
Tobias
Haha,
I found a work around.
1. Add the FS_LIST to the form
2. Show the toolbar with the ADD / EDIT buttons
3. Go to properties / default values
4. Add one default entry
5. Set the toolbar to hide
<LAYOUT>
<ADD component="toolbar" constraint="hide"/>
<ADD component="overview" constraint="center"/>
<ADD component="stackedview" constraint="hide"/>
</LAYOUT>
6. Remove the ADD button
<ACTIONS>
<ACTION name="ADD"/>
<ACTION name="EDIT"/>
</ACTIONS>
Within the ContentCreator you can't Remove/Add items, but you can change the existing one.
Is that solution ok that way?
kind regards
Tobias
Haha,
I found a work around.
1. Add the FS_LIST to the form
2. Show the toolbar with the ADD / EDIT buttons
3. Go to properties / default values
4. Add one default entry
5. Set the toolbar to hide
<LAYOUT>
<ADD component="toolbar" constraint="hide"/>
<ADD component="overview" constraint="center"/>
<ADD component="stackedview" constraint="hide"/>
</LAYOUT>
6. Remove the ADD button
<ACTIONS>
<ACTION name="ADD"/>
<ACTION name="EDIT"/>
</ACTIONS>
Within the ContentCreator you can't Remove/Add items, but you can change the existing one.
Is that solution ok that way?
kind regards
Tobias
Hello Tobias,
I'm not sure if I understand your question correctly. You want default values when you add an entry to your FS_LIST? But in your workaround you removed the add-button so that you just have a single entry?
Please describe your question and your use case in detail so that we can figure out if your solution is the recommended one and mabye if a FS_LIST is the perfect input component to use.
Best regards from Dortmund
Rene
Hello Rene,
the way you described it is absolutely correct. I just want not that the user is able to remove the single entry from out of a FS_LIST, so I add it via default properties and save the form so that it is entered into the fallback.xml. After this I remove the buttons so that the user is only able to click on it in the ui, but not to remove it.
kind regards
Tobias
Hello Tobias,
your workaround is the only way I know. If you are using only one entry inside your FS_LIST you can use the referenced template directly instead of using it inside a FS_LIST.
Kind regards
Rene
Thanks a lot!