Yii CHtml::radioButtonList - CSS to align horizontally
Looks like you might need
div#gender input
{
float:left;
}
yii framework: how to i put a label to a radio button?
I got the code online! Sharing it of that it can be useful for someone in future
<?php echo $form->radioButtonList($model,'radio',array('m'=>'male','f'=>'female'),array('separator'=>'', 'labelOptions'=>array('style'=>'display:inline'))); ?>
Yii: Issue in RadioButtonList
I think this article can help:
http://www.yiiframework.com/wiki/110/styling-radio-buttons/
Or even this one: http://code.dimilow.com/yii-radio-button-list-example-or-how-to-remove-the-line-break-separator/
Things that I notice in your code (Yii class reference):
- Where is the model?
- Where the select name?
Anyway, below an example of this, try take out your javascript code, to make easier figure out the problem:
<?php echo CHtml::radioButtonList($model, 'ck_Skill',
array(4 => 'Professional Skill', 5 => 'Suggestion'),
array('separator' => ' ',
'onChange'=>CHtml::ajax(array('type'=>'POST', 'dataType'=>'json',"url" =>array("search/search"),
"success"=>"function(response){
$('#textfield-wrapper').html(response.data);
}",
))));?>
Yii, radioButtonList disabling OR enabling dropDownList
Your question isn't related to yii realy. It's completely a javascript question and therefore has javascript based solutions. However, I think you should have an event handler for clicking on radiobutton
:
$(document).ready(function(){
$('input[type=radio]').change(function(){
if(this.value == /* something */)
disableBox();
else
//function for enabling dropDownList
});
})
How to add another element to Yii radioButtonList template?
That's not possible with the current implementation. You have to loop over your list data and create the buttons manually with CHtml::radioButton()
or CHtml::activeRadioButton()
.
Related Topics
Is There a List of Browser Conditionals for Use Including Stylesheets
Showing The Jsf Error Messages
Why Is "Border-Color" Overridden by "Color"
Seeing CSS Pseudo-Elements in Firebug
Vertical Align Multiple Image with Different Height
How to Customize The Editorfor CSS with Razor
Transform-Origin Not Working on Firefox
Font-Weight:900 Only Working in Firefox
How to Override Bootstrap Style
CSS Re-Centering Elements on Wrap
Ie 11 Ignores Min-Width When Using Flex Width
Google Fonts External CSS Vs Copying The Code of External CSS in My CSS
What Tool How to Use to Test The: Contains() CSS3 Pseudo-Class in a Browser
CSS Selector Compare 2 Attributes