I am using the “Add Page by Form” Plugin to offer a way to add pages in the frontend. What I would like to do now is to add a text field where the user can add tags. Optimally I would like to have something similar to the input field that is used in the admin panel when creating new pages.
For the admin panel there is a taxonomy field type, however this is unavailable for frontend forms. Does anyone know if and how to make this field type available for my form as well? Can you define custom field types for frontend forms per plugin or in a theme?
Thank you for your answer. I know that I can do this using regular text fields, but I would like to have the “fancy” text field that is used in the admin panel (which allows you to select already existing tags for instance).
Almost, I mean the taxonomy field type. I know that it is only available for admin forms, I was hoping that there is a way to define custom field types for frontend forms that would allow me to replicate the functionality for frontend forms.
@bleutzinn, could your Add Page By Form plugin use this functionality with the template plugins/admin/themes/grav/templates/forms/fields/taxonomy/taxonomy.html.twig to create a custom form field type that would allow a selection of tags in the front-end form?
This might be a good approach. The plugin function which gets called from the form need not be in the Add Page plugin. It could be just about the only function in a tiny plugin of its own.
Somewhere and quite some time ago I remember to have read that with version 2.0 there will be no more difference between admin (blueprint) and frontend forms. If so it will be in Grav 1.7 since version 2 will not feature new functionality as mahagr wrote in May 2020.
The only problem is when - or should I say if ? - version 1.7 is released. In less than 4 weeks from today the blog post about the release of 1.7 RC1 is over a year old. That is even the latest blog post in general of Grav.
At the moment I’m not able to figure this out. Also I must admit that because of the above mentioned and the much praised benefits of Flex objects and pages being a well kept secret I am kind of loosing my enthusiasm for Grav as a whole. Still hoping things will change for the better though.
Thanks for your response. I’m pretty new to grav and I’m curious about the slow release of 1.7 as well. Considering all the time I’ve invested in learning it, I do hope it stays relevant and updated!
I’m sort of interested in Hugo as well… But that’s another topic