Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] Create Terms and Conditions in Community Builder

  • walkyrie
  • walkyrie
  • OFFLINE
  • Posts: 4
  • Thanks: 0
  • Karma: 0
11 years 11 months ago #214245 by walkyrie
great for you... which one?!!

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

11 years 11 months ago #215952 by aussiemike
Would you please share your solution. I would also like to see a popup or modal window for terms and conditions. Opening another window or tab just seems a little 'unprofessional' these days.

Any solutions appreciated.

Mike

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48473
  • Thanks: 8281
  • Karma: 1443
11 years 11 months ago #215989 by krileon
You can use CB Auto Actions with a Code action on the before registration form display to add jQuery to the header that causes a jQuery ui model display (load ui-all jQuery plugin) on click. Below should work.

Type: Code
Triggers: onBeforeRegisterFormDisplay
Access: Everybody
Method: jQuery
Code:
Code:
$( 'body' ).append( '<div id="cbfv_termsc_dialog" style="padding: 0; margin: 0; overflow: hidden;"><iframe src="' + $( '#cbfv_termsc a' ).attr( 'href' ) + '" width="100%" height="100%"></iframe></div>' ); $( '#cbfv_termsc_dialog' ).dialog({ title: $( '#cbfv_termsc a' ).html(), resizable: false, draggable: false, modal: true, autoOpen: false, width: ( $( window ).width() * 0.9 ), height: ( $( window ).height() * 0.9 ) }); $( window ).resize( function() { $( '#cbfv_termsc_dialog' ).dialog( 'option', 'width', ( $( window ).width() * 0.9 ) ); $( '#cbfv_termsc_dialog' ).dialog( 'option', 'height', ( $( window ).height() * 0.9 ) ); }); $( window ).scroll( function() { $( '#cbfv_termsc_dialog' ).dialog( 'option', 'position', 'center' ); }); $( '.cbRegistration' ).delegate( '#cbfv_termsc a', 'click', function() { $( '#cbfv_termsc_dialog' ).dialog( "open" ); return false; });
Plugins: ui-all

The above is thoroughly tested as working. It'll turn the terms and conditions URL into a hidden iframe then on click will open it in a browser window sized jQuery dialog (it'll resize with the browser and always scroll into view) of the iframe. You'll need to edit your terms and conditions url and append &tmpl=component so it only shows the article though.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: aussiemike, cesarmtz

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

11 years 11 months ago #216028 by aussiemike
Thank you. I am new to the auto actions plugin so this has been a good starting point.

I was almost going to say it didn't work but then realised that I had not published the plugin.

I do have a question though. I am using a mobile responsive template. Is there an edit to the code that would make the popup responsive to the browser size? I did a bit of playing around with it but only managed to resize the window.

Thanks Kyle, I'm sure I will have a few more questions about the auto actions. Is there any documentation besides the examples given on the information page?

Regards
Mike

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48473
  • Thanks: 8281
  • Karma: 1443
11 years 11 months ago #216125 by krileon

I do have a question though. I am using a mobile responsive template. Is there an edit to the code that would make the popup responsive to the browser size? I did a bit of playing around with it but only managed to resize the window.

Leave the code as is as it already adjusts based off browser size. It'll also resize as the browser is resized.

Is there any documentation besides the examples given on the information page?

Nope, they're just automations of various actions. Many of them are self explanatory as they walk you through each parameter and have descriptions of what each parameter does. The Code action requires coding knowledge as it just executes the various methods at the trigger selected.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: aussiemike

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

  • cesarmtz
  • cesarmtz
  • OFFLINE
  • Posts: 41
  • Thanks: 1
  • Karma: 0
11 years 9 months ago #219818 by cesarmtz
It worked for me but know I would like to add an OK button at the bottom of the window. I tried but it did not work out. Could you help me please?

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

Moderators: beatnantkrileon
Powered by Kunena Forum