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 CiviMember (Moderator: Deepak Srivastava) »
  • On donate/subscribe page (w/ profile) - create drupal account box auto-checked?
Pages: [1]

Author Topic: On donate/subscribe page (w/ profile) - create drupal account box auto-checked?  (Read 3264 times)

Laryn

  • I post frequently
  • ***
  • Posts: 192
  • Karma: 4
    • CEDC
  • CiviCRM version: 4.6.x
  • CMS version: Drupal 7
On donate/subscribe page (w/ profile) - create drupal account box auto-checked?
January 28, 2008, 02:13:42 pm
Is there a way to change the box on the donate/subscribe page for "Create an account" (in drupal) to be automatically checked?
CEDC...social justice by design

*Get support on the new CiviCRM help site. /laryn

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: On donate/subscribe page (w/ profile) - create drupal account box auto-check
January 28, 2008, 09:42:54 pm
You will have to do some custom coding for this.

Check  CRM/common/CMSUser.tpl

HTH

kurund
Found this reply helpful? Support CiviCRM

Laryn

  • I post frequently
  • ***
  • Posts: 192
  • Karma: 4
    • CEDC
  • CiviCRM version: 4.6.x
  • CMS version: Drupal 7
Re: On donate/subscribe page (w/ profile) - create drupal account box auto-checked?
January 29, 2008, 09:04:58 am
Thanks for the point in the right direction -- I figured out how to make it show by default but am still working on how to make it checked by default.

It seems the id of the checkbox changes with each page load, otherwise I could use document.getElementByID("id").value=1, I think. Where (ie. which file) is that id generated?

lpkb
CEDC...social justice by design

*Get support on the new CiviCRM help site. /laryn

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: On donate/subscribe page (w/ profile) - create drupal account box auto-check
January 30, 2008, 11:22:56 am
lpkb:

Id for checkbox is autogenerated by Quickform. You might want to use getElementsByName ?

HTH

kurund
Found this reply helpful? Support CiviCRM

Laryn

  • I post frequently
  • ***
  • Posts: 192
  • Karma: 4
    • CEDC
  • CiviCRM version: 4.6.x
  • CMS version: Drupal 7
Re: On donate/subscribe page (w/ profile) - create drupal account box auto-checked?
August 11, 2008, 01:09:51 pm
The 2.0.5 version is much easier to work in for this.

In the file Kurund mentioned above I found this code:
Code: [Select]
if ( document.getElementsByName("cms_create_account")[0].checked ) {
     show('details');
  } else {
     hide('details');
  }

...and added the following line above it (to automatically check the box and open the field asking for a username):
Code: [Select]
document.getElementsByName("cms_create_account")[0].checked=1;
CEDC...social justice by design

*Get support on the new CiviCRM help site. /laryn

organicathlete

  • Guest
Re: On donate/subscribe page (w/ profile) - create drupal account box auto-check
October 01, 2008, 11:19:01 am
Quote from: Kurund Jalmi on January 28, 2008, 09:42:54 pm
You will have to do some custom coding for this.

Check  CRM/common/CMSUser.tpl

Where is this file?  We're on 2.0.5, and I don't see a /common folder in /CRM.  I did a search for the CMSUser.tpl file and couldn't find that either.

-Bradley

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: On donate/subscribe page (w/ profile) - create drupal account box auto-checked?
October 01, 2008, 11:51:31 am

all tpl files are in the templates directory, so the below file is:

templates/CRM/common/CMSUser.tpl

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

organicathlete

  • Guest
Re: On donate/subscribe page (w/ profile) - create drupal account box auto-checked?
October 01, 2008, 12:30:19 pm
Ah, thanks!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • On donate/subscribe page (w/ profile) - create drupal account box auto-checked?

This forum was archived on 2017-11-26.