Support

Home Forums Multiple Event Registration Add-on Hiding registration form hides event price/time

Hiding registration form hides event price/time

Posted: April 4, 2013 at 6:55 pm

Viewing 5 reply threads


infosolwebadmin

April 4, 2013 at 6:55 pm

Wasn’t sure where to put this, but I am using an add to cart button on my events (in the description using the provided shortcode) and not using the default registration form. When I choose no for the ‘display registration form?’ option, it hides the events start time/end time and price, as well as the form. Any way to change that so that they continue to show up when the form isn’t being displayed?

Example event with the form hidden:
http://esschi.com/event-registration/?ee=10

And here is another event with the form displayed:
http://esschi.com/event-registration/?ee=11

Thanks as always!


Dean

April 5, 2013 at 4:50 am

Hello Yolande,

The best way to resolve this would be to move the times in the template files so they are outside of the section that gets hidden.

In the registration_page_display.php file there is a block of text around line 155 that looks like this

        // * * This section shows the registration form if it is an active event * *

            if ($display_reg_form == 'Y') {
?>
            <p class="event_time">
<?php
                    //This block of code is used to display the times of an event in either a dropdown or text format.
                    if (isset($time_selected) && $time_selected == true) {//If the customer is coming from a page where the time was preselected.
                        echo event_espresso_display_selected_time($time_id); //Optional parameters start, end, default
                    } else {
                        echo event_espresso_time_dropdown($event_id);
                    }//End time selected
?>
            </p>
<?php

                // Added for seating chart addon

All you would need to do is change it to look like this

?>
            <p class="event_time">
<?php
                    //This block of code is used to display the times of an event in either a dropdown or text format.
                    if (isset($time_selected) && $time_selected == true) {//If the customer is coming from a page where the time was preselected.
                        echo event_espresso_display_selected_time($time_id); //Optional parameters start, end, default
                    } else {
                        echo event_espresso_time_dropdown($event_id);
                    }//End time selected
?>
            </p>
<?php


        // * * This section shows the registration form if it is an active event * *

            if ($display_reg_form == 'Y') {

                // Added for seating chart addon

It literally just moves the time outside of the block that gets hidden.


infosolwebadmin

April 5, 2013 at 12:24 pm

Awesome, thanks! I also moved up the code that displays the event price and stuck it beneath the even time:

    ?&gt;


                TRUE, 'label'=&gt;$price_label) );?&gt;

&lt;?php
                    //This block of code is used to display the times of an event in either a dropdown or text format.

And it is showing now as well, so I think I am good to go.


infosolwebadmin

April 5, 2013 at 12:25 pm

And I don’t know what happened with my code copy and pasting, this is what I wanted to show:

?&gt;


                TRUE, 'label'=&gt;$price_label) );?&gt;

&lt;?php
                    //This block of code is used to display the times of an event in either a dropdown or text format.


infosolwebadmin

April 5, 2013 at 12:28 pm

Alright last attempt, here is a screenshot link! My post is displaying differently than what shows up in the preview.

http://oi46.tinypic.com/28krbpz.jpg


Dean

April 8, 2013 at 12:38 am

Hi Yolande,

Pastebin.com is an excellent way to share code, especially as the forum here tends to strip the code out unless you are an admin.

Let me know if you have any troubles with the code!

Viewing 5 reply threads

The support post ‘Hiding registration form hides event price/time’ 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