Note that there are some explanatory texts on larger screens.

plurals
  1. PO<g:form> in grails missing when rendered in firefox
    text
    copied!<p>Do anyone have any idea about this?I have a template _contact.gsp rendered as a column in the right side of a view.Following is its code:</p> <pre><code> &lt;div id="contact-${contactType.id}" class="contact" style="${contactType.isPrimary == 1 ? '' : 'display: none;'}"&gt; &lt;g:hiddenField name="contact-${contactType?.id}.id" value="${contact?.id}"/&gt; &lt;g:applyLayout name="form/input"&gt; &lt;content tag="label"&gt;&lt;g:message code="prompt.organization.name"/&gt;&lt;/content&gt; &lt;content tag="label.for"&gt;contact-${contactType?.id}.organizationName&lt;/content&gt; &lt;g:form id="form-org" action="search"&gt;// this tag is not rendered &lt;input type="text" id="Company" value="search for..." name="Company" class="field"&gt; &lt;/g:form&gt; &lt;/g:applyLayout&gt;&lt;div&gt; &lt;label style="visibility:hidden" for="PRIVATE" class="lb"&gt;-------------------------------------&lt;/label&gt;&lt;a onclick="$('#form-org').submit()" style="display:inline"&gt;&lt;img src="/jbilling/images/icon-search.gif"&gt;&lt;/a&gt;&lt;/div&gt; &lt;g:applyLayout name="form/input"&gt; &lt;content tag="label"&gt;&lt;g:message code="prompt.first.name"/&gt;&lt;/content&gt; &lt;content tag="label.for"&gt;contact-${contactType?.id}.firstName&lt;/content&gt; &lt;g:textField class="field" name="contact-${contactType?.id}.firstName" value="${contact?.firstName}" /&gt; &lt;/g:applyLayout&gt; &lt;g:applyLayout name="form/input"&gt; &lt;content tag="label"&gt;&lt;g:message code="prompt.last.name"/&gt;&lt;/content&gt; &lt;content tag="label.for"&gt;contact-${contactType?.id}.lastName&lt;/content&gt; &lt;g:textField class="field" name="contact-${contactType?.id}.lastName" value="${contact?.lastName}" /&gt; &lt;/g:applyLayout&gt; &lt;g:applyLayout name="form/text"&gt; &lt;content tag="label"&gt;&lt;g:message code="prompt.phone.number"/&gt;&lt;/content&gt; &lt;content tag="label.for"&gt;contact-${contactType?.id}.phoneCountryCode&lt;/content&gt; &lt;span&gt; &lt;g:textField class="field" name="contact-${contactType?.id}.phoneCountryCode" value="${contact?.phoneCountryCode}" maxlength="3" size="2"/&gt; - &lt;g:textField class="field" name="contact-${contactType?.id}.phoneAreaCode" value="${contact?.phoneAreaCode}" maxlength="5" size="3"/&gt; - &lt;g:textField class="field" name="contact-${contactType?.id}.phoneNumber" value="${contact?.phoneNumber}" maxlength="10" size="8"/&gt; &lt;/span&gt; &lt;/g:applyLayout&gt; &lt;g:applyLayout name="form/input"&gt; &lt;content tag="label"&gt;&lt;g:message code="prompt.email"/&gt;&lt;/content&gt; &lt;content tag="label.for"&gt;contact-${contactType?.id}.email&lt;/content&gt; &lt;g:textField class="field" name="contact-${contactType?.id}.email" value="${contact?.email}" /&gt; &lt;/g:applyLayout&gt; &lt;g:applyLayout name="form/input"&gt; &lt;content tag="label"&gt;&lt;g:message code="prompt.address1"/&gt;&lt;/content&gt; &lt;content tag="label.for"&gt;contact-${contactType?.id}.address1&lt;/content&gt; &lt;g:textField class="field" name="contact-${contactType?.id}.address1" value="${contact?.address1}" /&gt; &lt;/g:applyLayout&gt; &lt;g:applyLayout name="form/input"&gt; &lt;content tag="label"&gt;&lt;g:message code="prompt.address2"/&gt;&lt;/content&gt; &lt;content tag="label.for"&gt;contact-${contactType?.id}.address2&lt;/content&gt; &lt;g:textField class="field" name="contact-${contactType?.id}.address2" value="${contact?.address2}" /&gt; &lt;/g:applyLayout&gt; &lt;g:applyLayout name="form/input"&gt; &lt;content tag="label"&gt;&lt;g:message code="prompt.city"/&gt;&lt;/content&gt; &lt;content tag="label.for"&gt;contact-${contactType?.id}.city&lt;/content&gt; &lt;g:textField class="field" name="contact-${contactType?.id}.city" value="${contact?.city}" /&gt; &lt;/g:applyLayout&gt; &lt;g:applyLayout name="form/input"&gt; &lt;content tag="label"&gt;&lt;g:message code="prompt.state"/&gt;&lt;/content&gt; &lt;content tag="label.for"&gt;contact-${contactType?.id}.stateProvince&lt;/content&gt; &lt;g:textField class="field" name="contact-${contactType?.id}.stateProvince" value="${contact?.stateProvince}" /&gt; &lt;/g:applyLayout&gt; &lt;g:applyLayout name="form/input"&gt; &lt;content tag="label"&gt;&lt;g:message code="prompt.zip"/&gt;&lt;/content&gt; &lt;content tag="label.for"&gt;contact-${contactType?.id}.postalCode&lt;/content&gt; &lt;g:textField class="field" name="contact-${contactType?.id}.postalCode" value="${contact?.postalCode}" /&gt; &lt;/g:applyLayout&gt; &lt;g:applyLayout name="form/select"&gt; &lt;content tag="label"&gt;&lt;g:message code="prompt.country"/&gt;&lt;/content&gt; &lt;content tag="label.for"&gt;contact-${contactType?.id}.countryCode&lt;/content&gt; &lt;g:select name="contact-${contactType?.id}.countryCode" from="${CountryDTO.list()}" optionKey="code" optionValue="${{ it.getDescription(session['language_id']) }}" noSelection="['': message(code: 'default.no.selection')]" value="${contact?.countryCode}"/&gt; &lt;/g:applyLayout&gt; &lt;g:applyLayout name="form/checkbox"&gt; &lt;content tag="label"&gt;&lt;g:message code="prompt.include.in.notifications"/&gt;&lt;/content&gt; &lt;content tag="label.for"&gt;contact-${contactType?.id}.include&lt;/content&gt; &lt;g:checkBox class="cb checkbox" name="contact-${contactType?.id}.include" checked="${contact?.include}"/&gt; &lt;/g:applyLayout&gt; &lt;/div&gt; </code></pre> <p>When i ran this code in firefox, the view is rendered fine, except the form tag is missing.I checked this in firebug when the button clicked returned no response.The firebug shows the source as follows: <strong>source of the view rendered in firefox corresponding to the applyLayout tag containing the form tag</strong></p> <pre><code>&lt;div class="row"&gt; //notice this;form is absent &lt;label for="contact-20.organizationName"&gt;Organization Name&lt;/label&gt; &lt;div class="inp-bg "&gt; &lt;input type="text" class="field" name="Company" value="search for..." id="Company"&gt; &lt;/div&gt; </code></pre> <p></p> <p>Because of this conversion from form tag to div tag, my button is not working. Plz help to prevent this conversion...</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload