Tag in front-end form

Home Forums Calendar Products Community Events Tag in front-end form

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #996767
    Houman
    Participant

    Tags are required for all event submissions and need to also have tags as a column in the list display. Can this be done?

    #996826
    Brook
    Participant

    Howdy Houman,

    I would love to help you with that.

    Both of those are definitely possible. We even have a tutorial for making fields like tags required in Community. If you follow the steps in that link, you should be good there.

    As far as modifying the template to show a list of tags, that is also possible. You will need some PHP knowhow to make the modification and show a list of tags, but nothing more than most theme modifications. Again we have a tutorial for how to make theme modifications called the Themer’s Guide. Is that tutorial something that will assist you, or is that outside of your skillset?

    Does that all make sense? Please let us know.

    Cheers!

    – Brook

    #996866
    Houman
    Participant

    Hi Brook,

    I am not a developer but I was able to follow some instructions in relation to this to hide certain modules in the event add form. I did look at: https://theeventscalendar.com/knowledgebase/required-fields-for-events-submission-form/ and I don’t see anything about requiring “tags”.

    Are you sure tags are supported? Not sure what to do from here. I see the first step may be adding something to the theme’s function file. But the example code shown doesn’t have an example for how to include the taxonomy tag. Further – I would imagine I would have to add something to the taxonomy module for the submission form but upon looking at that code it looks like it only considers event categories.

    Ben

    #997080
    Houman
    Participant

    This reply is private.

    #997259
    Houman
    Participant

    This reply is private.

    #997339
    Brook
    Participant

    For sure! I am sorry for the delayed response.

    I mistakenly though you knew how to add a WP tagging UI, you were just wondering where to put it and how to make it required. You said you are not a developer though, which probably means this sort of customization is going to be beyond the scope of your abilities. But just in case I will outline what needs to happen, and a little background info on how this works. Perhaps if you have a developer you can pass this along to him and he can write the actual code for you?

    Our Community plugin handles the input of $_POST[‘tax_input’] exactly as WordPress does, it runs it through wp_set_post_terms(). So in order to add a tag all you need to do is submit it just like WP does on the back end, you populate $_POST[‘tax_input’][‘post_tag’] with an array of tags. Our plugin already populates $_POST[‘tax_input’][‘tribe_events_cat’] with the list of categories, and then as I said runs the entire $_POST[‘tax_input’] through wp_set_post_terms(). So getting the data saved should be relatively easy, it doesn’t look like you will even need to added any rules to the validator or scrubber to get this working.

    So knowing that this could be somewhat easy. You could embed a customized version of the backend tagging UI on the frontend community form using a theme override as outlined at the outset. Once it’s there, it should actually list tags and allow people to choose just as they do on the backend, you just need to pull it out from the backend and get it working on its own. Then upon submission its data will be inserted with the rest of the taxonomy data.

    To mark it required, you can follow that tutorial I linked at the outset and check if $_POST[‘tax_input’][‘post_tag’] is empty, thus making it a required field.

    I wish there was a way to walk a non-developer through all of the work that would need to go into this customization, but that could take days of training to prepare you with everything you would need to understand this, in addition to the hours it will take to write and test this customization. 🙁

    Please let us know if that helps your developer. Or if you don’t currently have one, we can point you to a list of developers who are familiar with The Events Calendar. Or, if you want to officially suggest that we add tags to the Community Events plugin in a future version you can do that on UserVoice, then others could vote their support for it as well!

    Does that make more sense now?

    – Brook

    #1001594
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Tag in front-end form’ is closed to new replies.