Support

Home Forums Event Espresso Premium Problems with Add a Course Curriculum Section to “Thank You” Page Using ACF

Problems with Add a Course Curriculum Section to “Thank You” Page Using ACF

Posted: July 2, 2018 at 10:50 am

Viewing 9 reply threads


Sydney85

July 2, 2018 at 10:50 am

I went through this tutorial a few times trying to figure it out. I fixed the first problem of images not showing by setting Return Value in the image section in ACF to image URL.

2nd Problem is there are no links to the files that are added. I have tried changing the return value settings here with no luck.
How do I get a clickable link for the files?


Josh

  • Support Staff

July 2, 2018 at 1:48 pm

Hi there,

May I ask are you using ACF Pro or the free version? The Pro version has the repeater field type which is used in that tutorial. The code would need to be modified to do individual course file fields.

You’ll find additional code examples in the ACF documentation:

https://www.advancedcustomfields.com/resources/file/#template-usage


Sydney85

July 2, 2018 at 4:00 pm

I’m using the pro version


Josh

  • Support Staff

July 2, 2018 at 8:45 pm

OK then. Does your code and the field name for Course Files match?

For example, here’s a screenshot of the Course Files fields set up:
https://slack-files.com/T02SY781D-FBJVDPEMD-d7f868b756
and the sub fields:
https://slack-files.com/T02SY781D-FBH71NS8Y-a6017c0517

which match the code from the example:

<?php if(get_sub_field("course_files", $registration->event()->ID())): ?>
  <ul>
  <?php foreach(get_sub_field("course_files", $registration->event()->ID()) as $cf): ?>
    <li><a href="<?php echo $cf['course_file']['url']; ?>"><?php echo $cf['course_file']['title'];?></a></li>
  <?php endforeach; ?>
  </ul>
<?php endif; ?>

and if everything matches, it results in the links for each file displayed:
https://slack-files.com/T02SY781D-FBHQFJ06P-f3f2205a5a


Sydney85

July 17, 2018 at 4:58 pm

Still working on getting this working.

Anyway to get these links sent out with the registration confirmation email?


Sydney85

July 17, 2018 at 5:10 pm

Everything matches. I have gone through the tutorial twice and I’m having the same problem.


Tony

  • Support Staff

July 18, 2018 at 4:23 am

I ran through the tutorial on a new test site locally and the links work there – http://take.ms/f0otg

Can you link me to the thank you page of a test registration so I can view the output, please?

If you edit the course files on one of your events, click the pencil to edit the file details and check if the ‘URL’ field is set? – http://take.ms/lOCaa


Sydney85

July 19, 2018 at 4:51 pm

URL Field is set. The site is currently in maintenance mode. How do I get you a log in?

Here is the thank you page: https://721stay.com/thank-you/?e_reg_url_link=1-79ddd18a7c1dab8f7ef5f3f76ff62ba0
Registration Page: https://721stay.com/events/this-is-a-test-event/#tkt-slctr-tbl-6754


Tony

  • Support Staff

July 20, 2018 at 2:29 am

To send temp login details you can use this form:

https://eventespresso.com/send-login-details/


Tony

  • Support Staff

July 20, 2018 at 4:00 pm

Ok, your ‘Course file’ field is in the wrong section, it should be a sub field of the Course Files repeater, you have it it’s own field.

This is how the repeater should be set up – http://take.ms/cRknI

This is how yours is set up – http://take.ms/xOsa0
Your course file – http://take.ms/L74u9

You need to move the course file in to be a sub field of the repeater.

Take another look over the image from the tutorial here – https://eventespresso.com/wp-content/uploads/2014/05/acf-ee-add-new-curriculum.jpg

It’s a subtle difference when viewing the screen, but it means the code is looking in the wrong location.

Viewing 9 reply threads

The support post ‘Problems with Add a Course Curriculum Section to “Thank You” Page Using ACF’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso