[TYPO3-english] optional fields in FCE
Jigal van Hemert
jigal.van.hemert at typo3.org
Sat Oct 6 10:29:24 CEST 2012
Hi,
On 6-10-2012 7:04, Harish A wrote:
> I didn't understand where to unset 'required'. I want to make an FCE with 2
> field elements with the option to enter one field at a time. Also an FCE
> should render the content with only the selected element.
If you create a field in TemplaVoilà you have in the "Form" section a
form field "Form configuration:". Here you can define how the field
looks and how it behaves. This configuration is basically what is
possible in TCA configuration, but written as XML.
For example for a "plain input field" the configuration is
<type>input</type>
<size>48</size>
<eval>trim</eval>
If you lookup the options for an input field in the TCA reference [1]
you'll find the options for 'eval'. You could use
<eval>required,trim</eval>
to make the field required.
I think that you want something different? Maybe you want the editor to
add extra copies of the same fields (or sets of fields). For example to
create a list of links where the editor can determine how many links
should be in the list.
This can be done in TemplaVoilà by using Section Containers and
Containers For Elements [2]. The tutorial has screenshots of older
versions of TYPO3 and TemplaVoilà but the functionality is still the same.
[1]
http://typo3.org/documentation/document-library/core-documentation/doc_core_tca/4.7.1/view/1/3/#id385120
[2]
http://typo3.org/documentation/document-library/tutorials/doc_tut_ftb1/1.0.1/view/1/4/#id1474807
--
Jigal van Hemert
TYPO3 CMS Core Team member
TYPO3 .... inspiring people to share!
Get involved: typo3.org
More information about the TYPO3-english
mailing list