1

I have searched the forum and cannot find the answer to my question. I know how to populate a dropdown with the categories that are already in the system, but what happens if the category that needs to be assigned to the entry doesn't exist in the list of categories.

So, my question is this. Is there a way to display the dropdown of categories, as well as having the ability to add more categories via a form on the front-end?

Thanks

  • 1
    Are you using the build-in FEEF feature or doing it via a Plugin? I don't think you can do it with the standard feature but with some Plugin magic you could achieve what you are after. – naboovalley Jan 20 '16 at 13:25
  • Built-in form FEEF. – Nicole Lambon Jan 25 '16 at 12:48
1

This isn't possible with the build in FEEF functionality.

You can however achieve this via a Plugin. What you need to do is to listen to the onBeforeSave event and make an if-statement to check if the entry is being added to your section. Then you can run a loop that checks all the submitted categories against your database and adds new entries for the categories that doesn't exist and re-populates your EntryModel with the new category ID's before insertion.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.