Custom fields that can support HTML?

Home Forums Calendar Products Events Calendar PRO Custom fields that can support HTML?

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #21736
    John
    Member

    I am needing to create some custom fields that can support html. I’m simply tryitng to create a “register here” link that will populate within the main event details (the details generated by pro calendar).

    #21759
    Jonah
    Participant

    Hi John,

    The only custom fields available via our plugin are the ones you see. You can wrap custom field output in whatever HTML you want though and this should do what you need. Here is an example: https://gist.github.com/2901504

    I hope that helps!

    – Jonah

    #21774
    John
    Member

    Im not sure how this helps. Here is a screen cast of my issue. http://screencast.com/t/RRFlUuTf

    I’m simply trying to create my own static link within “event, date, cost, category, ect..” I just need a link that says “register here” and it links out to my registration portal.

    Also, is there a way to include the mini calendar in this area? please see screen cast.

    jon

    #21778
    Jonah
    Participant

    Hi John,

    You would add the above code to a copy of /wp-content/plugins/the-events-calendar/views/single.php placed in an ‘events’ folder in your theme and echo out your specific custom field by replacing “Label For Custom Field Link” with the label of the custom field(s) you want to output and wrapping that custom field output in whatever HTML you need. Look at the comment here for an example of the code wrapped in HTML: https://gist.github.com/2901504

    #21801
    John
    Member

    can you please show me what this looks like in the single.php document? Don;t know where to start and I need to have this basic functionality. thanks for your help

    jon

    #21869
    John
    Member

    Jonah, any ideas on how to do this? Just need some guidance.

    #21896
    Jonah
    Participant

    Hi John, sure. Take a look at my comment here: https://gist.github.com/2901504

    You would find this around lines 87-91 in single.php – I hope that helps!

    – Jonah

    #23193
    louis
    Participant

    Hi Jonah,
    Thanks for the info here. I’ve followed your instructions whole I’m close to getting the results I’m after, I’m still falling a little short. Can you help me a couple of minor things?

    First off, can you show/tell me where in your code to place the HTML tag so my link will be activated via a button rather than a standard web address link? (Here’s the code I’m using: Register Now)

    Secondly, as a test, I dropped in your code, changed the field name to match the one I created, and added a link, however, when I click the link, it just takes me back to my event listing and not to the page that’s linked. Any thoughts on why this is happening?

    Thanks for your help!

    #23199
    Rob
    Member

    Hey Louis. Thanks for the follow-up here. Just a heads up that Jonah is actually on sabbatical currently and will be for about the next month, but I’m happy to field this to another dev so we can get you a response. Just to set expectations, though — since it’s getting late on Friday I probably will not be able to get them to take a look until sometime Monday. That being said this is on the top of the queue for that day so you should have a response quickly into the new week.

    Thanks for your patience so far and please let me know if I can do anything else in the interim. Cheers!

    #23200
    louis
    Participant

    Thanks, Rob. I have a few more questions that are Event Calendar related but not specific to this topic. Should I ask you here or just post in the general forum?

    #23202
    Rob
    Member

    If you would be willing to post them into new threads (ideally a separate thread for each distinct issue, so we don’t create confusion addressing multiple issues in the same thread) it’d be fantastic…and we could respond directly from there. Cheers!

    #23304
    Casey
    Participant

    Louis,
    Regarding your first question, you should be able to do something like this instead of using an anchor tag: https://gist.github.com/3277768

    Regarding your second question, make sure you’ve first created the custom field for your event. You’ll want to make sure this custom field name is consistent across events: http://www.diigo.com/item/image/1s965/te6j?size=o

    After you’ve done that, then you’ll want to modify the code to use your custom field name instead of ‘Label For Custom Field Link’.

    Hope that helps! Let me know if you have any other questions.

    #23476
    louis
    Participant

    Thanks, Casey! I’ll try those out and keep you posted!

    #23494
    louis
    Participant

    Casey, thanks for the help and I got the above up and running which led me to a new question…
    I have two Custom Field options (Webinar or Lunch) that I want to send users to a custom registration page (one for each option) when the “Register Now” button is clicked. These options will be set up in my Custom Field with a radio button so only one of them can be selected at a time. Can you help me with setting up the code for this? I tried copying the code and replacing the custom field name but that just gave me two buttons next to each other.

    #23699
    Rob
    Member

    Hey there Louis. Thanks for the follow-up; glad to hear Casey’s first tip got you where you needed to be on that end.

    I’m not sure the level of effort required for your second request; it may be outside the realm of what we can provide support on if it’s complex customization, but if Casey has any tips that can point you in the right direction I’ll definitely have him pass those on. I’ve asked him to take another look accordingly.

    Stay tuned and thanks for your patience so far.

Viewing 15 posts - 1 through 15 (of 16 total)
  • The topic ‘Custom fields that can support HTML?’ is closed to new replies.