Create an Additional Field that does not appear on the front-end

Home Forums Calendar Products Events Calendar PRO Create an Additional Field that does not appear on the front-end

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1088469
    Keith
    Participant

    Hi,

    I am creating a lot of events programmatically. The event creation code sometimes issues warnings or errors. I want to attach those warnings and errors to the event, so that I can review the event before publishing it. The events are created as drafts. In other words, I need somewhere save error messages to each event.

    I’d like to use an Additional Field. The event creation code would write the messages to the field and then I would read through the events, acting on the error messages before publishing the event. The problem is that it seems that Additional Fields are displayed on the event on the front-end by default. Is there any way I can disable that display for a specific Additional Field?

    An alternative would be to use the built-in Word Press custom field functionality which by default does not display on the front-end. The disadvantage with that is that I have to scroll a long way down to find the field, then click the triangle to open it. As I’ll be checking a lot of events, that would be a very laborious process.

    So, in short, can I create an Additional Field, called for example “Import Log” and not have that field display on the calendar front-end?

    Regards,
    Keith

    #1088845
    Geoff B.
    Member

    Good evening Keith and welcome back!

    Thank you for reaching out to us.
    I would love to try to help you with this topic.

    But just to set expectations, as you know, the scope of our support is mostly to get our wonderful customers started on the right track to customize their site and to help them in case of issues. We unfortunately do not provide complete support for customization.

    With that in mind, here’s a couple of answers to your question.

    Is there any way I can disable that display for a specific Additional Field?

    This might be overly simplistic, but as long as the field in question has a specific CSS class or ID, you could just use CSS to hide it from the front-end (display:none).

    As an alternative, using WordPress hooks, you could have a function that simply filters that field in specific views (using our  Themer’s guide as a starting point).

    Using the custom field could also work, you would just need to have a specific view that includes it.

    In any case, best of luck and remember, you can always hire one of our recommended customizers to do the customization for you.

    Best regards,

    Geoff B.

    #1088865
    Keith
    Participant

    Hi Geoff,

    I did look at the CSS option, but unfortunately there is no specific class or id. That means I would be getting in “nth child” type selections, and the n could change depending on what other fields were displayed for any given event.

    I realise that you don’t support customisations. I thought it was worth asking in case there was a straightforward answer. The default WordPress Custom fields don’t show up on the front end unless you specifically add code to show them. That made me think that there must be some code in TEC that is specifically designed to display the Additional Fields (i.e. the TEC version of WP custom fields), and that it might be possible to modify that code to disable the display of a specific Additional Field.

    Anyway, I’m looking into adding a filter. I’ll see where I get with that.

    Regards,
    Keith

    #1089397
    Geoff B.
    Member

    Hey Keith,

    Thank you for your understanding.

    Unfortunately I do not have a straightforward solution to this.
    But you are right, we use a few functions to get the custom fields when defined: https://theeventscalendar.com/?s=custom+field&post_type%5B%5D=documentation&submit=

    As you can see, the last 2 functions allow you to get and echo the custom fields by label. So that could be an interesting way to go about it.

    That being said, I am pretty confident you can do what you are looking for, it will mostly be a matter of choosing an approach for it.

    Let me know how that goes.

    Best regards,
    Geoff B.

    #1095965
    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 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Create an Additional Field that does not appear on the front-end’ is closed to new replies.