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) »
  • Checkbox for Honor Roll in Personal Campaign Page
Pages: 1 [2]

Author Topic: Checkbox for Honor Roll in Personal Campaign Page  (Read 2119 times)

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Checkbox for Honor Roll in Personal Campaign Page
March 04, 2013, 08:07:47 am
Happy to help. Good luck with your project.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

building252

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 0
  • CiviCRM version: Latest
  • CMS version: Joomla 2.5.8
  • MySQL version: 5.5.28
  • PHP version: 5.3.18
Re: Checkbox for Honor Roll in Personal Campaign Page
March 15, 2013, 07:52:03 am
Hi Hershel,

Thank you again for that code on the checkbox...major help!!

I was curious is their a way to make the name field thats shows up the honor roll a required field? Hard to believe that people are (not all) still forgetting to put their Name in the box. I've put step by step instructions and added the code (you provided) to open that area and some people still don't get it.

John
« Last Edit: March 15, 2013, 03:38:53 pm by building252 »

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Checkbox for Honor Roll in Personal Campaign Page
March 15, 2013, 07:59:12 am
Quote from: building252 on March 15, 2013, 07:52:03 am
I was curious is their a way to make the name field thats shows up the honor roll a required field?

You can do that in jQuery also. :)
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

building252

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 0
  • CiviCRM version: Latest
  • CMS version: Joomla 2.5.8
  • MySQL version: 5.5.28
  • PHP version: 5.3.18
Re: Checkbox for Honor Roll in Personal Campaign Page
March 15, 2013, 08:17:56 am
That's what I figured...I'm exploring now. I tried this but it blew up the page, back to researching...still learning.

Code: [Select]
{literal}
<script type="text/javascript">
cj(document).ready(function() {
cj("input#pcp_roll_nickname").validate({
rules: {
name: {
required: true,
minlength: 3
}
}
});
});
</script>
{/literal}

building252

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 0
  • CiviCRM version: Latest
  • CMS version: Joomla 2.5.8
  • MySQL version: 5.5.28
  • PHP version: 5.3.18
Re: Checkbox for Honor Roll in Personal Campaign Page
March 15, 2013, 03:55:51 pm
Wow...much more difficult than it looks. I think I'm gonna leave this one alone, until I have a better understanding of how jQuery is implemented in CiviCRM.

Even if I did get the form to be required there's gonna be a validation issue. If you leave blanks fields in the regular form and hit continue, the form shows the "is a required field" message but unchecks the box for the honor roll section.



building252

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 0
  • CiviCRM version: Latest
  • CMS version: Joomla 2.5.8
  • MySQL version: 5.5.28
  • PHP version: 5.3.18
Re: Checkbox for Honor Roll in Personal Campaign Page
April 05, 2013, 11:31:34 am
I discovered a small issue with the code below, that automatically checks the box for "Show my Support in the Public Honor Roll"

Code: [Select]
{literal}
<script>
cj("input#pcp_display_in_roll").click();
pcpAnonymous();
</script>
{/literal}

When a radio button is chosen for the payment method, it unchecks that box. The data stays in tack but the box gets unchecked, which prevents the Name and Personal message from showing up on the honor.

Here's a link to the page so you can see what I mean:
https://stompoutchildabuse.org/index.php?option=com_civicrm&task=civicrm/event/register&id=1&pcpId=6&reset=1

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Checkbox for Honor Roll in Personal Campaign Page
April 06, 2013, 12:41:45 pm
Appears to me this is a bug in CiviCRM actually b/c if you manually check the " Show my support in the Team Roster" button and then choose a payment method, it unchecks it.

What you would have to do is add an .extra file to the payment template snippet being loaded, so re-check that box. Of course it may be more complicated, b/c the person may have UNchecked it meanwhile....

I would suggest you consider hiring a professional if you need further help with this.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

building252

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 0
  • CiviCRM version: Latest
  • CMS version: Joomla 2.5.8
  • MySQL version: 5.5.28
  • PHP version: 5.3.18
Re: Checkbox for Honor Roll in Personal Campaign Page
April 06, 2013, 01:16:51 pm
Hey Hershel,

Thanks for the response...this event takes place in two weeks. Everyone that goes to a personal campaign page is wanting to show up on the roster. I'm using CiviEvent and the PCP pages as team pages.

I just figured out how to get the "include my name and message" radio stay ticked, which keeps that area open but the main check box is still unchecked. If you can take a quick look at this code and maybe let me know what else needs to be added to force the checkbox above to stay checked with the radio button that would be awesome. If not I understand...I'm trying to get this working today.

Code: [Select]
{literal}
<script>
function pcpAnonymous( ) {
if ( cj('input[name="payment_processor"]')[1].checked ) {
      cj("input#pcp_display_in_roll").click(true);
    pcpAnonymous();
}
}
</script>
{/literal}

Thanks :)

building252

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 0
  • CiviCRM version: Latest
  • CMS version: Joomla 2.5.8
  • MySQL version: 5.5.28
  • PHP version: 5.3.18
Re: Checkbox for Honor Roll in Personal Campaign Page
April 06, 2013, 01:25:12 pm
I think I got it working....if you can just confirm it for me that would be great :)

Code: [Select]
{literal}
<script>
function pcpAnonymous( ) {
if ( cj("input#payment_processor")[1].checked ) {
      cj("input#pcp_display_in_roll").click(true);
    pcpAnonymous();
}
}
</script>
{/literal}

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Checkbox for Honor Roll in Personal Campaign Page
April 06, 2013, 01:33:25 pm
Looks good to me. :)
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

building252

  • I post occasionally
  • **
  • Posts: 51
  • Karma: 0
  • CiviCRM version: Latest
  • CMS version: Joomla 2.5.8
  • MySQL version: 5.5.28
  • PHP version: 5.3.18
Re: Checkbox for Honor Roll in Personal Campaign Page
April 06, 2013, 01:36:30 pm
Sweet...thanks. Can't flipping believe I actually figured that out. I guess the Adderall does work :)

Pages: 1 [2]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Checkbox for Honor Roll in Personal Campaign Page

This forum was archived on 2017-11-26.