Forums de discussion

Required message not properly shown when radio button

thumbnail
Javier Solana, modifié il y a 9 années.

Required message not properly shown when radio button

Junior Member Publications: 59 Date d'inscription: 26/06/14 Publications récentes
Hi all,

I have a problem when making a radio button field required. The displayed message is shown on the left hand side of the first option, and should be on the right.

I found this bug: https://issues.liferay.com/browse/AUI-1378 and it is supposed to be fixed, but no idea how to get it or solve it in my liferay.

My code is the following:

<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %>

...

<aui:field-wrapper> 
    	<aui:input name="general_6" type="radio" value="0" label="general_6_r1">
    		<aui:validator name="required" />
    	</aui:input> 
    	<aui:input name="general_6" type="radio" value="1" label="general_6_r2" /> 
    </aui:field-wrapper>


Thanks for helping!
thumbnail
Javier Solana, modifié il y a 9 années.

RE: Required message not properly shown when radio button

Junior Member Publications: 59 Date d'inscription: 26/06/14 Publications récentes
Come on!

168 accesses and nobody has an answetr to this issue??
thumbnail
Drew Brokke, modifié il y a 9 années.

RE: Required message not properly shown when radio button

New Member Publications: 12 Date d'inscription: 09/01/14 Publications récentes
Which version of portal are you running? I just did a test on the latest version according to the instructions on the ticket, and the message appeared below all the radio buttons.
thumbnail
Javier Solana, modifié il y a 9 années.

RE: Required message not properly shown when radio button

Junior Member Publications: 59 Date d'inscription: 26/06/14 Publications récentes
Thanks for the reply!

This is what I have:

  • liferay-portal-6.2-ce-ga2 (tomcat-7.0.42)
  • <%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %>
thumbnail
Drew Brokke, modifié il y a 9 années.

RE: Required message not properly shown when radio button

New Member Publications: 12 Date d'inscription: 09/01/14 Publications récentes
So from what I can tell, the ticket you referenced does fix that issue in the latest development build, but does not apply to the version you have.

If you are comfortable building from source, you could download the alloy-ui release-zip here and replace the zip in your source code, located at liferay-portal/portal-web/third-party. Building from source would then place the updated alloy files in the appropriate places. The zip would include other changes as well, so be aware that there is the small possibility of something else breaking. Look through the release history here if you would like to know more about what changed before you try this method.

Otherwise, you can attempt to manually re-create the fix from the ticket, found here. Add those changes to the /tomcat-7.0.42/webapps/ROOT/html/js/aui/aui-form-validator/aui-form-validator.js file in your bundle.

Hope this helps!
thumbnail
Javier Solana, modifié il y a 9 années.

RE: Required message not properly shown when radio button

Junior Member Publications: 59 Date d'inscription: 26/06/14 Publications récentes
Thank you so much!!

I manually changed the file /tomcat-7.0.42/webapps/ROOT/html/js/aui/aui-form-validator/aui-form-validator.js following the ticket and it works fine!