Removing the payment information

More
7 years 1 month ago - 7 years 1 month ago #95507 by Roberto Bonazza
Replied by Roberto Bonazza on topic Removing the payment information
Hi everybody,
I used a trick to hide the payment information with CSS.
First I created a custom field called hide_payment (I think that the type is not important, but I used the heading type) and I published in last place in the form and I just assigned to free courses.
Then I used this css to hide payment information:

#field_hide_payment, #field_hide_payment + h3, #field_hide_payment + h3 + div { display: none;}

In my site it works fine
Roberto
Last edit: 7 years 1 month ago by Roberto Bonazza.
The following user(s) said Thank You: James Riley

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

More
7 years 1 month ago - 7 years 1 month ago #95510 by James Riley
Replied by James Riley on topic Removing the payment information
Nice use of the CSS Adjacent Sibling Selector (+)
Ideally, the whole Payment Information block SHOULD be wrapped in a ID'd <div> so that it can be formatted and targetted, and each form line should have some unique ID or CLASS attached... but until that is added, this is a sweet little hack-around for compliant browsers.

James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.
Last edit: 7 years 1 month ago by James Riley.

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

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
7 years 1 month ago #95528 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Removing the payment information
Thanks for sharing the solution. However, there is one thing I don't understand. For Free Events, actually, Payment Information section should not be shown

You are saying that Payment Information section is being shown even for free events? if so, look like a bug / conflict to me

Tuan

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

More
7 years 1 month ago #95543 by Roberto Bonazza
Replied by Roberto Bonazza on topic Removing the payment information
Yes it is. Honestly, I seem to remember that at the beginning of my tests with Events Booking the payment information were not shown for free events, but now the section is always present. To hide it I set "Registration Type" to "Only Individual Registration" and "Enable Coupon" to "Only for Group". This hide Coupon, Discount Amount and Gross Amount fields. To hide the remaining fields (Payment Information title and Amount field) I used a hidden field and css as described above. I attached a screenshot of a free event registration form.

Roberto
Attachments:

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

Moderators: Tuan Pham Ngoc