我想使用modby addon formz對我的表單使用gumbyframework。要做到這一點,我必須創建我自己的下面的塊。我「認爲」我擁有所有需要的元素,並且使用了這些塊,所以我不明白爲什麼這種方法無法正常工作。主要的錯誤消息雖然顯示。Modx formz不保留提交的值,也不保留其錯誤消息
我也收到這個錯誤信息,但我不知道它是否與formz相關。
[2014-03-03 19:32:47] (ERROR @ /example/index.php) `[[+id]]` is not a valid integer and may not be passed to makeUrl()
formTpl
[[!FormIt?
&hooks=`[[+action]][[+hooks:notempty=`,[[+hooks]]`]]`
&tpl=`emailTpl`
&excludeFields=`submit[[+id]]`
&submitVar=`submit[[+id]]`
&formid=`[[+id]]` [[- "Form ID"]]
&store=`1`
&storeTime=`900`
&successMessage=`<p>[[+success_message]]</p>`
&emailTo=`[[+email:default=``]]`
[[+properties]]
[[+validation:notempty=`&validate=`[[+validation]]``]]
[[+validationText:notempty=`[[+validationText]]`]]
]]
[[!+fi.successMessage]]
[[!+fi.validation_error_message]]
<form id="form[[+id]]" class="form [[+identifier]]" action="" method="post">
<fieldset>
[[+fields]]
</fieldset>
<div class="actions row">
<div class="form__field__submit columns ten push_two">
<input type="hidden" name="submit[[+id]]" value=" [[+action_button:default=`Submit`]]"/>
<a class="submit" type="submit" name="submit[[+id]]" class="btn primary" href="javascript:document.getElementById('form[[+id]]').submit();">[[+action_button:default=`Submit`]]</a>
</div>
</div>
fieldTpl
[[!field? &type=`[[+type]]` &name=`[[+id]]` &label=`[[+label]]` &req=`[[+required]]` [[+type:eq=`checkbox`:then=`&array=`1``]] &options=`[[+values]]` &default_value=`[[+default]]` &tpl=`formz__field--gumby` &outer_tpl=`formz__wrap--gumby`]]
字段渦卷
<!-- default -->
<div class="[[+outer_class]] row" id="[[+name]]_wrap">
<div class="form__field__label columns two">
<label for="[[+name]]" title="[[+name:replace=`_== `:ucwords]]">[[+label:default=`[[+name:replace=`_== `:ucwords]]`]][[+req:notempty=` *`]]</label>
</div>
<div class="form__field__input columns ten field">
[[+inner_html]]
[[+note:notempty=`<span class="[[+note_class:default=`note`]]"><em>[[+note]]</em></span>`]]
[[+error:notempty=`<span class="[[+error_class]]">[[+error]]</span>`]]
</div>
</div>
<!-- default -->
<!-- select -->
<div class="[[+outer_class]] row form__row--half_margin_bottom" id="[[+name]]_wrap">
<div class="form__field__label columns two">
<label for="[[+name]]" title="[[+name:replace=`_== `:ucwords]]">[[+label:default=`[[+name:replace=`_== `:ucwords]]`]][[+req:notempty=` *`]]</label>
</div>
[[+inner_html]]
[[+note:notempty=`<span class="[[+note_class:default=`note`]]"><em>[[+note]]</em></span>`]]
[[+error:notempty=`<span class="[[+error_class]]">[[+error]]</span>`]]
</div>
</div>
<!-- select -->
<!-- radio -->
<div class="[[+outer_class]] row form__row--half_height" id="[[+name]]_wrap">
<div class="form__field__label columns two">
<label for="[[+name]]" title="[[+name:replace=`_== `:ucwords]]">[[+label:default=`[[+name:replace=`_== `:ucwords]]`]][[+req:notempty=` *`]]</label>
</div>
[[+inner_html]]
[[+note:notempty=`<span class="[[+note_class:default=`note`]]"><em>[[+note]]</em></span>`]]
[[+error:notempty=`<span class="[[+error_class]]">[[+error]]</span>`]]
</div>
</div>
<!-- radio -->
<!-- checkbox -->
<div class="[[+outer_class]] row form__row--half_height" id="[[+name]]_wrap">
<div class="form__field__label columns two">
<label for="[[+name]]" title="[[+name:replace=`_== `:ucwords]]">[[+label:default=`[[+name:replace=`_== `:ucwords]]`]][[+req:notempty=` *`]]</label>
</div>
[[+inner_html]]
[[+note:notempty=`<span class="[[+note_class:default=`note`]]"><em>[[+note]]</em></span>`]]
[[+error:notempty=`<span class="[[+error_class]]">[[+error]]</span>`]]
</div>
</div>
<!-- checkbox -->
字段類型
任何人? o.O會很高興解決這個問題:/ –
仍然不?? :(ghosh我真的需要這個幫助... –