making extra field predefined

Home Forums Calendar Products Events Calendar PRO making extra field predefined

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1275113
    Simone
    Participant

    Hi,
    I added an extra field in the single event, which is the opening hour of the club.
    You can see that in:
    http://www.stonescafe.it/evento/23-and-beyonde-the-infinite/
    (on right sidebar, labeled ALTRO).
    Two questions about that:
    – could it be possible to have this text a predefined value, so when I input new events, it’s already filled in (such as happens for LOCATION…)
    – I’d like to change the ALTRO label with ORARI LOCALE, how can I do that?

    Thanks in advance for your support!
    Cheers
    Simone

    #1275732
    Cliff
    Member

    Hi, Simone.

    1)

    To clarify, please let me know if all this is correct:

    1. You have a PRO Additional Field — text field type — called ORARI LOCALE
    2. When you create a new event, you want this Additional Field to have a default value of “APERTURA LOCALE (GIO-VEN-SAB ORE 19.30 / DOM ORE 18.00)INIZIO LIVE 22.00”
    3. Therefore, it’ll display that text unless otherwise entered/customized.

    2)

    The ALTRO text is the translated “Other” text from /wp-content/plugins/events-calendar-pro/src/views/pro/modules/meta/additional-fields.php but in your case it’s likely from /wp-content/themes/[your-theme-or-child-theme]/tribe-events/pro/modules/meta/additional-fields.php

    We have this information regarding customizing translations:

    Please let me know about question #1.

    #1277097
    Simone
    Participant

    Hi Cliff,
    thanks for your answer, about #1, yes you’re absolutely right about what I’d like to obtain..
    About the translation, thanks for the tip 😉
    Waiting your reply,
    cheers
    Simone

    #1277582
    Cliff
    Member

    Here’s a code snippet that you can customize to insert a default value for your PRO Additional Fields:

    https://gist.github.com/cliffordp/447bc4c3a3e8c9f4c3c5c3fbc1a1a9c6

    Customize it to your needs and then please let me know how it worked for you.

    #1278030
    Simone
    Participant

    Hi Cliff, thank you so much for your help,
    since I’m not so familiar customizing plugins, please could you tell me where I should paste this snippet of code? Is this going to be lost in the next updates or I can create a separate file under the main theme folder such as for CSS customizations ?

    Thank you again,
    Simone

    #1278244
    Cliff
    Member

    Welcome to WordPress customizing!

    Best practice for adding custom code (like to implement a PHP snippet to modify The Events Calendar) is to create a functionality plugin, unless it’s something specific to your theme, in which case best practice is to make sure you’re using a child theme, then add the customization to your child theme’s functions.php file.

    I hope this information helps!

    #1278428
    Simone
    Participant

    That’s great!
    I didn’t know that ability to create functionality plugins, thanks so much for sharing this info!

    About my issue, I did the functionality plugin and activated it. Now when entering a new event, in backend the custom field is not precompiled, but when I publish that event, in frontend it displays correctly.
    Any ideas about how to display the precompiled text field in the backend so the data entry user can also modify the text before publishing?
    Have a great day,
    Simone

    #1278531
    Cliff
    Member

    I’m glad to have helped thus far toward this customization for your site. I provided the solution I thought would be most appropriate and useful for you and other users, which is why I was able to go a bit above-and-beyond here. However, we’re limited in how much customization help we can provide, per our Scope of Support / Terms.

    There are a variety of ways your desired implementation could be accomplished. If there’s a code snippet you’d like me to put some eyes on or something else I can help you with, please update this ticket or create a new ticket if it’s a separate issue.

    Thank you very much for your understanding.

    If you need some coding help, you may want to ask your developer or reference our documentation and list of known customizers.

    #1289472
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘making extra field predefined’ is closed to new replies.