Forms: taxonomy field type for frontend forms


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?

Thanks in advance for your help,
Paul R.

The second example in the Add Page by Form Plugin README file includes adding extra taxonomy tags.

It uses the regular field type text.

I hope this helps but maybe I’m misunderstanding your question.

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).

I think you mean the Selectize Field type which is available in Admin Blueprint forms only sadly.

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.

In general it would be great when there was no difference in backend and frontend form fields.

There are a number of ways to take a step in that direction or in adding the Taxonomy field type only:

  1. Ask for it in the Form Plugin repository
  2. Suggest it in the Roadmap for Grav 2
  3. Change the Form Plugin and do a pull request
  4. Hire someone to do it (way nr. 3) for you