Ken

Forum Replies Created

Viewing 10 posts - 76 through 85 (of 85 total)
  • Author
    Posts
  • Ken
    Participant

    I have tried both of the options here, although I am a bit hesitant to do the 2nd solution since it would be overwritten on the next upgrade. Correct?

    Needless to say I was not able to get the value not appear in when viewing the list.

    Here is a link to the pastebin with the code section I am using:
    http://pastebin.com/ZcnGv89c

    Ken
    Participant

    Johan,

    That would work fine for a text field if no data is entered, but I am using a drop down for the custom fields and by default the first item in a dropdown is always selected/used after updating/publishing an event.

    So I used “none” as my first item, but I cant get this to work..

    tribe_get_custom_field('Duration') !='none'

    Ken
    Participant

    Is there a function to check if there is nothing selected or a certain value is selected that it doesn’t display the label/field value? I have field label “Duration” set with: none, 30 min, 45 min, 60 min.

    I tried:

    $my_dur = 'none';
    if (tribe_get_custom_field('Duration') != $my_dur):
    // show table row...Skip if duration is 'none'
    endif;
    // show next table row...

    Ken
    Participant

    Thanks Jonah, I could not find those functions. That solved my issue.

    in reply to: Events Calendar PRO Feature Requests #14793
    Ken
    Participant

    Thanks Rob,

    Also as I mentioned on the discussion board a way to display the duration of an event automatically. Right now I have a drop down using a custom field that will display the duration but if there where a way to calculate the time difference from start to end and display it that could be useful for some I would think.

    Ken
    Participant

    The post did not like the code.

    Here is a link to the code http://pastebin.com/cicLgGtV

    Ken
    Participant

    I am adding this to my template file for the listing:

    But this is what is returned:

    Duration:

    Duration:90 minutes

    Is there a way to return the just the value of the custom field instead of both the field label and the value? The method works fine for the single event page but the list template uses a table not a tag. Would the other choice be to re-write the list.php template file using instead of a ?

    in reply to: Events Calendar PRO Feature Requests #14747
    Ken
    Participant

    How about a way to duplicate events, or creating new events based of saved events (like venues and organizers)?

    in reply to: Use event info in gravity form #14524
    Ken
    Participant

    Thanks for the responses Rob,

    I knew it would be a long shot since GF is not your product but since there was some integration with ECP taking place I was hoping to get some insight on this forum.

    The good news is that I have solved the issue with getting the date and the event in the subject line.

    After using the above code in the functions.php file I used GF to create the form. I created a hidden field and checked a box next to it to have “Allow field to be populated dynamically” and then entered the parameter “event_date” from the add_filter function added to functions.php file.

    That will show the date in the body of the email when returned. I then went to the form notifications section and now noticed that there was now a merge tag added to the dropdown list for the hidden item that was created in the form. I added that merge tag to the subject line as well as the default tag for adding the post title. Here is the final subject line in GF.
    Registration for {embed_post:post_title} on {Start Date:8}

    I am pretty excited about this. Just 1 registration form for all the events or I could create one form for each class and reuse them to have a better way to view all the responses on the backend.

    in reply to: Use event info in gravity form #14385
    Ken
    Participant

    I have been able to make some progress on this;


    /********************************************************************
    Add event date parameter to Gravity Forms
    ********************************************************************/
    add_filter('gform_field_value_event_date', 'my_custom_population_function');
    function my_custom_population_function($value){
    return tribe_get_start_date(null, false, 'F j, Y - g:i a');
    }

    This will return the date in the body of the email. I created a hidden field in the form that has the “Allow field to be populated dynamically” checked and placed ‘event_date’ in the parameter name field.

    Now to see if I can get it in the subject line.

Viewing 10 posts - 76 through 85 (of 85 total)