Hello,
I am evaluating Orbeon forms by trying to create simple application. I want to collect data from external users, I want to build form using Form Builder and then possibly work with the data with XML parser with other application. E-mail notification would also be nice. I created the form with form builder, but then I'm stuck, documentation being of no great help (maybe because Orbeon forms is quite complex). Here are my questions: - How do I get rid of PDF and preview buttons? In builder, there is only a placeholder. I would like people just to submit the form (with answers) and that is all. - Is it possible to create a "hidden" parameter from URL? Is this only Professional Edition feature (documentation on form builder would suggest so)? - How to secure the form (I want users to be able to add new submissions, but no editing or viewing) - Where do I get the data in one XML file? Or do I really need to browse all answers with different requests? How do I name the controls (no <control-1>aaa</control-1>, but the name of the control)? I am sorry, if these questions are obvious, I am fairly fluent in Java, a little bit less in XML, but I feel the documentation does not cover basic use cases (for form builder at least). Thank you, Juraj. -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi,
I am also a beginner in orbeon forms. But i can answer some of your questions. In my case i was using form builder and mysql for persistance. ANSWERS ---------- 1.How do I get rid of PDF and preview buttons? In builder, there is only a placeholder. The workflow buttons cannot be configured in the form builder. They can be configured in properties-local.xml located @ \orbeon\WEB-INF\resources\config Initially there will be a properties-local.xml.template file. Just rename it as properties-local.xml and add the following lines <property as="xs:string" name="oxf.fr.detail.buttons.*.*" value="pdf save submit"/> Here value attribute suggests that 3 buttons(pdf,save,submit) will be visible in the form. If you want only submit button, use <property as="xs:string" name="oxf.fr.detail.buttons.*.*" value="save"/> 2. Is it possible to create a "hidden" parameter from URL? Is this only Professional Edition feature (documentation on form builder would suggest so)? Your question is not clear. But anyway, you can have hidden fields in the form and you can pass a parameter in the url and extract the value and assign it to any filed(say textbox) in the orbeon form.(I personally used the same logic) 3. Where do I get the data in one XML file? Or do I really need to browse all answers with different requests? Since i am using MySql as persistence layer my form is stored as xml content in database. I use sax parser to parse the document to extract the values(Its quite easy). So after submission your form gets stored in the database which is directly related to whatever persistence layer you use... 4. How do I name the controls (no <control-1>aaa</control-1>, but the name of the control)? When you are creating the form using form builder, If you move the cursor next to the field (say textbox) you get to see two icons... the top one is meant for changing the control name(as you asked), the other for editing validations, visibility,data type etc. of the control field 5. - How to secure the form (I want users to be able to add new submissions, but no editing or viewing) While submission, the user can see only the url as http://<hostname>:<portnumber>/orbeon/fr/test-app/test-form/new/ where test-app is the app name and test-form is the form name. But in order to edit the form one must be aware of the document id of the form, which the user will not be aware of.. So he cant open the form in the edit mode.. |
Hello,
first of all, thank you for you reply, it was very helpful. > Your question is not clear. But anyway, you can have hidden fields in the > form and you can pass a parameter in the url and extract the value and > assign it to any filed(say textbox) in the orbeon form.(I personally used > the same logic) Do I need to edit sourcecode to do this? Basically, I would like to do something like: http://<hostname>:<portnumber>/orbeon/fr/test-app/test-form/new?id=1234 And when it is saved in XML, I need to have something like <hidden-value>1234</hidden-value> But I don't want user to see this anywhere else than the URL (so no text-field). By this, it should be for example possible to identify the user, that filled out the form, or some particular relation to a process outside Orbeon itself. I still can't find how to do this. I would probably bet for a "hidden field" control in builder. If it is only possible to do this by editing source code, I'm fine with that, but any pointer to documentation or example would help. > Since i am using MySql as persistence layer my form is stored as xml > content in database. I use sax parser to parse the document to extract the > values(Its quite easy). So after submission your form gets stored in the > database which is directly related to whatever persistence layer you use... Thanks for the tip, I will do the same. > 5. - How to secure the form (I want users to be able to add new > submissions, but no > editing or viewing) > > While submission, the user can see only the url as > > http://<hostname>:<portnumber>/orbeon/fr/test-app/test-form/new/ > > where test-app is the app name and test-form is the form name. But in > order to edit the form one must be aware of the document id of the form, > which the user will not be aware of.. So he cant open the form in the edit > mode.. I meant, that http://<hostname>:<portnumber>/orbeon/fr/test-app/test-form/ contains summary of answers, I don't want other people to see what was filled in. Maybe I'll just have to configure my application server properly to allow only specific requests. Thank you again, Juraj. -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
So if the url is
http://<hostname>:<portnumber>/orbeon/fr/test-app/test-form/new?id=1234 Create a textbox in the form builder, click validation settings(remember it is red exclamatory mark next to the textbox) and in the visibility property, give the value as false.So it will be hidden to the users.Also chenge the control name as emp-id. Now click the edit source button and add the following lines <xforms:model> <xforms:action ev:event="xforms-model-construct-done"> <xforms:setvalue ref="instance('fr-form-instance')/*/emp-id" value="xxforms:get-request- parameter('id')"/> </xforms:action> </xforms:model> What it does is 1. Gets the parameter (id) from the url 2. Sets it to hidden textbox The user will not know the id since the textbox is hidden(apart form the url). And when the user submits the form, the value gets store in the database from which you can parse and get the relevant id value. |
Free forum by Nabble | Edit this page |