Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-119199

Form will submit on a required hidden input

    Details

    • Branch Version/s:
      7.2.x
    • Backported to Branch:
      Committed
    • Fix Priority:
      3

      Description

      Reproduction steps:

      1) Compile and deploy the attached portlet with the below code in view.jsp:

      <portlet:resourceURL var="captchaURL" />
      <liferay-ui:error key="submitError"  message="Hello" />
      <p>
         <b>
            <liferay-ui:message key="TestPortlet.caption"/>
         </b>
         <portlet:actionURL name="requestCandidateInformation" var="requestCandidateInformationURL" />
      </p>
      <%
         String requestCandidateInformationUrl = requestCandidateInformationURL.toString(); 
         %>
      <aui:form action="<%=requestCandidateInformationUrl %>" method="post" name="fm">
         <aui:input name="firstName" label="lr_requesCandInfoFrstName" type="text" placeholder="lr_requesCandInfoFrstName" required="true"/>
         <aui:input name="firstNameHidden" label="lr_requesCandInfoFrstName" type="hidden" placeholder="lr_requesCandInfoFrstName" required="true" />
         <aui:button cssClass="btn-lg search-btn" tfronype="submit" value="lr_candidateDescRequestInfoButtonLabel" />
      </aui:form>
      

      2) Place the portlet on a page
      3) Fill the visible field
      4) Submit the form

      Expected behavior:
      Submission to stop, required validation to fire.

      Actual behavior:
      The required validation won't fire, the form will be submitted successfully.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              summer.zhang Summer Zhang
              Reporter:
              roland.pakai Roland Pákai
              Participants of an Issue:
              Recent user:
              Jason Pince
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 4 weeks, 2 days ago

                  Packages

                  Version Package
                  7.2.10 DXP FP8
                  7.2.10.3 DXP SP3
                  7.2.X
                  7.3.5 CE GA6
                  7.3.10 DXP GA1
                  Master