CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • "Register Now" button to be replaced with text after registration
Pages: [1]

Author Topic: "Register Now" button to be replaced with text after registration  (Read 707 times)

notyal

  • I’m new here
  • *
  • Posts: 16
  • Karma: 0
"Register Now" button to be replaced with text after registration
June 01, 2011, 08:55:48 am
Is there an easy way to display a message like "You are already registered for this event" if a user views an event that they have already register for? Currently, the "Resister Now" button simply disappears. This is creating some confusion as some users register for several events early, then forget that they registered for an event, try to go in and register again but don't see a register button, so they pick up the phone and call the office. Obviously, this is a source of frustration for both the user and the staff who answers these calls.

I am not a developer, but it seems pretty easy. Since the register button disappears, there must already be some logic that checks whether the user is registered for that event and hides or displays the button accordingly. I would just like to add a line of text to this when the button is hidden. Thanks in advance for the help.

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: "Register Now" button to be replaced with text after registration
June 02, 2011, 08:15:14 am
You will need some programming skills to implement this. This can be done using following logic:
1. Check if user is logged in
2. Check corresponding CiviCRM contact id.
3. Get registered events for the above contact.
4. Based this show / hide register button

Hth
Kurund
Found this reply helpful? Support CiviCRM

notyal

  • I’m new here
  • *
  • Posts: 16
  • Karma: 0
Re: "Register Now" button to be replaced with text after registration
June 02, 2011, 12:53:14 pm
I think it might be less complicated than that. The system already does a check to see if 1-3 is true. Currently it will hide the Register Now button if the person is already registered. I found what (i think) causes the button to disappear (below), so could I add something in there that says if registration is not allowed, display a line of text saying something like "You have already registered"? If so, how and where?

From CRM/Event/Page/EventInfo.tpl:

   {if $allowRegistration}
        <div class="action-link section register_link-section">
            <a href="{$registerURL}" title="{$registerText}" class="button crm-register-button"><span>{$registerText}</span></a>
        </div>
    {/if}

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • "Register Now" button to be replaced with text after registration

This forum was archived on 2017-11-26.