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 CiviContribute (Moderator: Donald Lobo) »
  • Disable select box on contribution page
Pages: [1]

Author Topic: Disable select box on contribution page  (Read 417 times)

mikem

  • I post occasionally
  • **
  • Posts: 70
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: 7.X
Disable select box on contribution page
March 13, 2014, 12:33:52 pm
I have a contribution page that uses price sets of a few memberships that our members are renewing. I have everything setup so after they fill out a webform they are directed to this contribution page and it defaults them to the correct membership fee amount.  - Is there a way to disable the drop down box on the contribution page so that they cannot change the selection of it?

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Disable select box on contribution page
March 20, 2014, 12:49:23 pm
There is no way within CiviCRM price sets by default to provide multiple options in a select but refuse to let them select one of those options.   I hope you understand that is a rare requirement.  That said, not sure why this workflow exists, but assuming you have good reason to redirect them from a webform to a CiviCRM contribution page, you could:

1. place only one option in the price set.  that way there is no other option to select

2. use jQuery attr('read-only',true); to "lock" the select box.  This requires modest amounts of programming skill.



Stuart
Try CiviTeacher: the online video tutorial CiviCRM learning library.

dhirendra

  • I’m new here
  • *
  • Posts: 27
  • Karma: -1
  • CiviCRM version: 4.4.3
  • CMS version: drupal 7
  • MySQL version: 5
  • PHP version: 5.3.3
Re: Disable select box on contribution page
April 04, 2014, 03:21:36 am
I think you can use jquery on that page
$(#id input).each(function() {
 $(this).attr(disabled,true);
});
This may be helpful to you....

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Disable select box on contribution page

This forum was archived on 2017-11-26.