Matze Posted March 24, 2019 Share Posted March 24, 2019 Hi there, i need around 20 simple text fields in a template, same properties for all, except the "label" (or title to use it in code). Something like this: painter: _____________ period: _____________ canvas material: _____________ painting technique: _____________ etc is there a way to avoid building 20 single fields? I use pro fields too, but cant see any solution e.g. with Multiplier or table. Thank you Matthias Link to comment Share on other sites More sharing options...
Matze Posted March 24, 2019 Author Share Posted March 24, 2019 Okay, it's "Textareas" - found it, sorry … (how can i delete a post?) 1 Link to comment Share on other sites More sharing options...
ottogal Posted March 24, 2019 Share Posted March 24, 2019 The MultiValue Textformatter might be of interest for your use case. (I have no own experience with it, though.) 1 Link to comment Share on other sites More sharing options...
Autofahrn Posted March 24, 2019 Share Posted March 24, 2019 @Matze, if you own or consider ProFields, you may check out FunctionalFields as well. While conceptionally intended for text translations, I do not see a reason why this should not work here. If you write something like this in your template file: $thePainter = __text(' ', 'painter', 'label=painter, required=true'); $thePeriod = __text(' ', 'period', 'label=period, required=true'); $theCanvas = __text(' ', 'canvas', 'label=canvas material, required=true'); $theTechnique = __text(' ', 'technique', 'label=painting technique, required=true'); You'll see that in your page editor: If you add more text replacement in your template file, these are added to all artist's pages immediately. Sidenote: I'll have to set a space for the original text, otherwise the fields do not show up, so they are actually not empty in this example. While this may be what you are looking for on first sight, I'd encourage you to think about using page references instead. Information like canvas material or painting technique are not endless and will repeat over various artists. Using plain text input, you'll have to repeat all this each time. And, if you are going multi-lingual, you'll have to enter every translation for every artist. With page references you'll have many benefits, like faster searches (who is painting with this particular technique in that period), generally less data in your database (less data to transfer to build an index, for example), one point to enter that information and may even add more info about it. You may even create new "attribute-pages" on the fly when entering the artist's page. 2 Link to comment Share on other sites More sharing options...
ottogal Posted March 24, 2019 Share Posted March 24, 2019 1 hour ago, Autofahrn said: @Matze, if you own or consider ProFields, you may check out FunctionalFields as well. If so, have a look to FieldsetGroups, too. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now