Disable Field In TCA When Editing A Record
Is it possible to disable a field in the TCA config, only when editing a record?
TCA config for new record:
'title' => [ 'exclude' => true, 'label' => 'Title', 'config' => [ 'type' => 'input', 'size' => 30, 'eval' => 'trim,required' ], ],
TCA config for existing records:
'title' => [ 'exclude' => true, 'label' => 'Title', 'config' => [ 'type' => 'input', 'size' => 30, 'eval' => 'trim,required' 'readOnly' => true, ], ],
I'm not aware of a built in solution for different TCA settings for new and existing records.
Since the final TCA is cached there is also no way to manipulate it with some PHP on runtime.
- → Prevent form action from being followed by robots
- → Render Link within Typoscript Controller
- → How can I implement the sitemaps for a TYPO3 Multidomainsystem when i have only one root folder?
- → TYPO3 - Overriding & adding meta tags (from tx_metaseo) on detail view of custom extension
- → How can i remove the region in TYPO3 9 SEO extension from hreflang
- → generate SEO sitemap for tt_address in TYPO3 and how to beautify with slugs
- → TYPO3 and IOS: can't open the page
- → TYPO3: How do i render tt_content text elements in my own extensions?
- → TYPO3 News Sitemap Configuration - actual date in additionalWhere statement
- → Check the Database of a typo3-Website
- → How to create a record and add an image in database in TYPO3
- → TYPO3 Frontent: Form Action results Page not found
- → RealURL with GET parameters