How can I add a “category” to forms, in addition to the “app” and “form”?

六月ゝ 毕业季﹏ 提交于 2019-12-12 02:33:47

问题


I have changed the code of Orbeon Form Builder to add a new input field in dialog-form-settings.xbl:

<xf:input ref="category" id="fb-category-input" xxf:autocomplete="off">
     <xf:label>Category</xf:label>
     <xf:hint>input Category</xf:hint>
</xf:input>

<!-- Dispatch event with result -->
<xf:dispatch name="fb-update-metadata" targetid="fb-dialog-form-settings">
    <xf:property name="app"         value="instance()/app"/>
    <xf:property name="form"        value="instance()/form"/>
    <!-- Add By Haibpl -->
    <xf:property name="category"        value="instance()/category"/>
    <!-- End Add -->
    <xf:property name="title"       value="instance()/title"/>
    <xf:property name="description" value="instance()/description"/>
    <xf:property name="logo" value="instance()/logo"/>
    <xf:property name="mode"        value="instance()/mode"/>
</xf:dispatch>

In crud.xpl, how can i get value of category like app (/request/app)?


回答1:


My recommendation most likely won't be what you're looking for, but here it is anyway: try to avoid making changes to Form Builder and Form Runner. Those changes can be hard to port to new versions of Orbeon Forms, make it hard to upgrade, and then, if you are stuck with an older version, to get support for it.

Also, while you can get help from Orbeon for these type of customizations under a Dev Support subscription, customization are not covered by PE subscriptions, and you won't get much help in the community either, as this isn't something we'd like to encourage.

So, have you thought of using the "app" as the "category"? And if you need both an "app" and a "category", have you thought about putting both in the "app" field with say a dash in between? E.g. hr-applications, instead of having an app hr and a category application?



来源:https://stackoverflow.com/questions/16228898/how-can-i-add-a-category-to-forms-in-addition-to-the-app-and-form

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!