Skip to Content Skip to Menu

bootstrap radiobutton in registration form

10 years 9 months ago - 10 years 9 months ago #239174 by thewebsurfer
bootstrap radiobutton in registration form was created by thewebsurfer
i want to use those buttons
Code:
<div class="btn-group" data-toggle="buttons-radio"> <button class="btn active" name="type" value="input" type="radio">male</button> <button class="btn" name="type" value="input" type="radio">female</button> </div>

instead of a radiobuttons field in registration form.
what is the best way to do that?
Last edit: 10 years 9 months ago by thewebsurfer.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48477
  • Thanks: 8281
  • Karma: 1443
10 years 9 months ago #239187 by krileon
Replied by krileon on topic bootstrap radiobutton in registration form
You'd have to use CB Auto Actions and a Code action on the registration form display trigger then use jQuery to try and modify the DOM. I highly suggest not doing this though as it's going to beak all of the jQuery bindings the field may have.


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.

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

10 years 9 months ago - 10 years 9 months ago #239192 by thewebsurfer
Replied by thewebsurfer on topic bootstrap radiobutton in registration form

krileon wrote: I highly suggest not doing this though as it's going to beak all of the jQuery bindings the field may have.


so how can i give my registration form a more modern and professional look?
can i at least add an image in radiobutton label?
Last edit: 10 years 9 months ago by thewebsurfer.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48477
  • Thanks: 8281
  • Karma: 1443
10 years 9 months ago - 10 years 9 months ago #239196 by krileon
Replied by krileon on topic bootstrap radiobutton in registration form
When it comes to large HTML restructuring like that you can't. The best you can do is try to use CSS to style it.

can i at least add an image in radiobutton label?

Make sure all your radio field values are language strings like _UE_MYVAL1 then translate it into HTML. Example as follows.

'_UE_MYVAL1' => '<img src="MY_IMG_URL" /> Value 1'

This usage should work ok.


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.
Last edit: 10 years 9 months ago by krileon.

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

10 years 9 months ago #239236 by thewebsurfer
Replied by thewebsurfer on topic bootstrap radiobutton in registration form
i realized my bootstrap radiobutton adding a few clean js code via autoactions :)
one question:
my radiobuttons are like
Code:
<span class="cbSnglCtrlLbl"> <input type="radio" name="cb_usertype" value="_UE_USERTYPE1" id="cbf203"> <label for="cbf203 btn">usertype1</label></span>

i've a problem with that class "cbSnglCtrlLbl" there is a way to differentiates each radiobutton span like cbSnglCtrlLbl1,cbSnglCtrlLbl2..?
any idea?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48477
  • Thanks: 8281
  • Karma: 1443
10 years 9 months ago #239237 by krileon
Replied by krileon on topic bootstrap radiobutton in registration form
With jQuery, yes, you'd just grab all of them and do an each loop which will give each an index that you could then add as a class if you wanted, but I don't really see a need to do that.


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.

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

Moderators: beatnantkrileon
Powered by Kunena Forum