Hide and show custom fields

  • lesliemathis
  • Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 1 month ago #14655 by lesliemathis
Hide and show custom fields was created by lesliemathis
I have custom text fields on my donation form that allow a donor to give information if their gift is in memory of someone. Can I create a check box: "This gift is in honor of someone" and only show the custom fields if the check box is checked?

If that is possible, I would appreciate being pointed in the right direction. I am comfortable with css, html, php and mysql.

Thank you!

Please Log in or Create an account to join the conversation.

More
12 years 1 month ago #14664 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Hide and show custom fields
Hi

Unfortunately, the extension doesn't have this feature. In this case, you will need to edit the donation form code directly to add code for supporting this feature. The file need to be modified is components/com_jdonation/views/donation/tmpl/default.php .

Good luck :) !

Tuan

Please Log in or Create an account to join the conversation.

  • lesliemathis
  • Topic Author
  • Offline
  • New Member
  • New Member
More
12 years 4 weeks ago #14804 by lesliemathis
Replied by lesliemathis on topic Re: Hide and show custom fields
Thanks, but is there a way to add the onchange event to a custom input field? could it be altered in the database?

Please Log in or Create an account to join the conversation.

More
12 years 4 weeks ago #14812 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Hide and show custom fields
Unfortunately, it is not possible. You will need to customize the code directly. Look at the file components/com_jdonation/helper/fields.php, you will see the code for custom field and should be able to customize it !

Regards,

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Mr. DamDũng Nguyễn Việt