Foren
create Horizontal radio button Alloy UI
Danial Habibi, geändert vor 12 Jahren.
create Horizontal radio button Alloy UI
Regular Member Beiträge: 141 Beitrittsdatum: 01.11.11 Neueste Beiträge
hi There I know it's silly questions.and i'm a newbie ,,but still I need to ask about this...how i can create horizontal radio button ,so it show in one line??as I try
<aui:field-wrapper name="gender">
<aui:input inlineLabel="right" name="KTP" type="radio" value="1" label="male" />
<aui:input checked="<%= true %>" inlineLabel="right" name="gender" type="radio" value="2" label="passport" />
</aui:field-wrapper>
<br>and<br><pre><code><aui:column>
<aui:input name="KTP" type="radio" value="ktp"></aui:input>
<aui:input name="Passport" type="radio" value=""></aui:input>
</aui:column></code></pre><br>it still showing every radio button on new line..<br>and how to enable/disable or show any form using radio button?for example if someone click KTP, only KTP form/field will be shown?or the passport field/form will disabled?<br><br><br>Thank's any help would be really appreciated, <br><br><br>Regards<br><br><br>Danial
jelmer kuperus, geändert vor 12 Jahren.
RE: create Horizontal radio button Alloy UI
Liferay Legend Beiträge: 1191 Beitrittsdatum: 10.03.10 Neueste Beiträge
I think you can set the inlineField attribute on aui:input to true to do that
Danial Habibi, geändert vor 12 Jahren.
RE: create Horizontal radio button Alloy UI
Regular Member Beiträge: 141 Beitrittsdatum: 01.11.11 Neueste Beiträgejelmer kuperus:
I think you can set the inlineField attribute on aui:input to true to do that
thank's jelmer,,it's work ...another question about radio button...how to enable/disable or show any form using radio button?for example if someone click KTP, only KTP form/field will be shown? did alloy Ui provide method for that?can u give some example?
regards
Danial
jelmer kuperus, geändert vor 12 Jahren.
RE: create Horizontal radio button Alloy UI
Liferay Legend Beiträge: 1191 Beitrittsdatum: 10.03.10 Neueste Beiträge
You can simply attach a javascript eventhandler and make the form visible on click or something like that
<aui:script use="aui-base">
var yourForm = A.one('#<portlet:namespace />yourFormName');
var yourRadioButton = A.one('#<portlet:namespace />yourAuiRadioButtonName');
yourRadioButton.on('click', function(event) {
yourForm.toggleClass('visible');
});
</aui:script>
Danial Habibi, geändert vor 12 Jahren.
RE: create Horizontal radio button Alloy UI
Regular Member Beiträge: 141 Beitrittsdatum: 01.11.11 Neueste Beiträgejelmer kuperus:
You can simply attach a javascript eventhandler and make the form visible on click or something like that<aui:script use="aui-base"> var yourForm = A.one('#<portlet:namespace />yourFormName'); var yourRadioButton = A.one('#<portlet:namespace />yourAuiRadioButtonName'); yourRadioButton.on('click', function(event) { yourForm.toggleClass('visible'); }); </aui:script>
I see Thank's Very Much Jelmer.and where I can find out about aui:script tag? just like parameter user="aui-base"? I've search there's no documentation about that?is that true?
Regards
Dania