JSF change p:selectBooleanCheckbox change style to radio - css

I need to change the style of 4 of my p:selectBooleanCheckBox to style it as radio button.

In more detail: if you would style check boxes as radio boxes, you will confuse the user, as multiple options can be selected, which is not the case with radio buttons. With radio buttons you can only select one option. So, I suggest to simply switch to radio buttons instead of trying to hack your way out of this.
If you really want to style your checkboxes, have a look at How do I override default PrimeFaces CSS with custom styles? But again, think hard before doing so.
The source of the free themes is open. See for example https://github.com/primefaces/primefaces/blob/master/src/main/resources/META-INF/resources/primefaces-saga/theme.css and search for radiobutton.

Related

Different options depending on QRadioButton

I have a Qt Designer form (widget), that includes N radio buttons. And i want to see different options (QGroupBox, etc) depending on selected button in the same widget. What is the right way to solve this problem?
Of course, i can place all boxes in widget and change their visibility depending on selected radio button, but that is not perfect i'm sure.
It seems like QStackedWidget is what you're looking for.
Put your radio buttons into a QButtonGroup, then connect QButtonGroup::buttonClicked(int) to QStackedWidget::setCurrentIndex(int).

How to have a symbol appear in a radio button before it is selected

I am using an adapted version of some nice CSS radio buttons that I found here, but I need them to have symbols in them, as each one will represent a specific user action. Specifically, I am using a plus symbol and an arrow symbol. I am able to change the "X" symbol in the custom radio buttons to a plus symbol and an arrow symbol, but I cannot figure out how to have them still appear before the radio button itself is selected. Right now, you can only see it after it is selected. I have tried moving the content: '\25B2' property to every other selector in the CSS, but it never seems to appear, I still have to select the radio button before it becomes visible. I really need these symbols to be visible at all times so they user knows which one to select.
fiddle
you need to set checked pass **checked** attribute in input type radio like
below.
here is code

Add custom button color to Visual Composer button settings

Is there a way to add a custom color/value to the color drop down of the button settings in visual composer? The site I'm developing has lots of colored buttons and rather than overriding one of the existing button classes with css I'd rather add the color(s) to the drop down. Otherwise I have to explain to the client "when you want this color button you have to select x color from the drop down". Which is just confusing.
Thanks!
Check this:
https://kb.wpbakery.com/docs/developers-how-tos/update-single-param-values/
Change all "cta_button" occurrences to "btn". Save the page with the button you want and the color you just created, then use Chrome to inspect the created element. It will come with a class named something like 'vc_btn_color-yourcolor'.
Just style that color on your style.css later.

How to create custom horizontal radio buttons with CSS?

I want to create radio buttons or other type of controls that will act like this:
[_value1_] [value2] [value3]
Value1 is selected, so it looks like pressed button or selected link (bold, no underline) and other elements are active buttons/links. When user select another value - state is changed. I can handle this event manually, question is - what plugin or existing css/js combination should I use to achieve this?
I am pretty sure that this type of controls have a name, but can't think out what is this. I have tried to search for custom style radio buttons, as functionality is the same, but failed. Also I have tried some other names such as switch buttons, but it's not what I want. It's also very similar to tabs, but tabs usually styled as something that require underline div attached. So I am looking for "radio button meet tabs" css/js solution.
Can you help me to name this control, if you know it's name, or find plugin/existing code that can help me to achieve my goal?
The question is not how to create this type of functionality myself, I can do it, but it's rather strange that there are no existing solutions and I want to help people in same situation, also may be existing solutions design can be better than I can invent myself, because I am not a designer.
Answer
This type of controls can be found as "Simplified CSS Tabs" or "CSS Mini Tabs", but they require some additional code to work as expected.
Also, this type of functionality can be found in Google as jQuery UI radio buttons transformed into a button set and Yahoo UI Button Control: Radio Buttons
http://jqueryui.com/demos/button/#radio
works done for ya bud :)

Drupal Webform generating radio buttons for select fields?

My webform is generating radio buttons instead of select fields. Does anyone have any idea what might be causing this?
When you are editing that field, look down at the very bottom under display and make sure "Listbox" is checked. It is the one that says:
Check this option if you want the
select component to be of listbox type
instead of radio buttons or
checkboxes.
You didn't say what version of the module you are using, but this should be accurate for all current versions. In the future it would be a good idea to include what version you are having the issue with when asking for help.

Resources