Gernott / mask

TYPO3 Extension Mask
https://www.facebook.com/typo3mask
GNU General Public License v2.0
131 stars 86 forks source link

[FEATURE] Prefilling tables #479

Closed ayacoo closed 2 years ago

ayacoo commented 2 years ago

With the type Select there is a field "foreign_table". Here you could read the tables from the TCA and output them as a select field instead of a manual input field. This prevents typing errors.

If you can roughly point me in that direction, I'd be happy to prepare a PR as well.

nhovratov commented 2 years ago
  1. Add new API endpoint to AjaxController and Configuration/Backend/AjaxRoutes.php
  2. Load the list of tables into data of root vuejs instance Resources/Public/JavaScript/Mask.js
  3. Think of a new field type name and add it to Resources/Public/JavaScript/Components/FormField.js with the custom rendering.
  4. Change the type in Configuration/Mask/TcaFields.php (foreign_table). Currently text.

A bit of VueJS knowledge is necessary, but I think it can be understood in the existing code. Depending on how fancy you would want to make it, I would suggest creating an own vue js component.

Thanks for suggesting this helpful feature!

ayacoo commented 2 years ago

Thanks for the detailed instructions. I will try my luck ;-)