Rendering with custom Template fails
Closed this issue · 1 comments
promotion commented
I'm using FileAttachmentField on a frontend . When a form is called with
$form->setTemplate('MyCustomtemplate');
FileAttachmentField is not rendered (only the Browse button is displayed as for single file)
Tried renaming template to remove "_holder" bit , but it then complains that my browser does not support HTML5 .
Frontend is Bootstrap based, however removing all css/js does not help :(
My form template below:
<form $FormAttributes>
<% if $Message %>
<h4 id="{$FormName}_error" class="message $MessageType">$Message</h4>
<% else %>
<h4 id="{$FormName}_error" class="message $MessageType" style="display: none"></h4>
<% end_if %>
<fieldset class="">
<div class="col-md-6">
<h3>Test Upload</h3>
<div class="field fileattachment supportedt" id="Failai">
<label for="changeProfileForm_ProfileForm_Slapyvardis" class="">Upload files</label>
<div class="middleColumn">
$Fields.dataFieldByName(Failai)
</div>
<span id="{$FormName}_error" class="message $Fields.dataFieldByName(Failai).MessageType">
$Fields.dataFieldByName(Failai).Message
</span>
</div>
</div>
$Fields.dataFieldByName(SecurityID)
</fieldset>
<% if $Actions %>
<div class="Actions">
<% loop $Actions %>$Field<% end_loop %>
</div>
<% end_if %>
</form>
promotion commented
OK, I copied new Form.ss as a core, pasted everything i need and used
$FieldHolder
for calling your field
This worked just perfectly !