I'm new to Orbeon. Perhaps this is a dumb question but I'll ask it anyway: is it possible in Orbeon to change the form data after the first time the form is submitted? I mean, suppose that I'm a student that is using Orbeon to enter some of my personal information into a form. After I submit the data I remember that I forgot some data or informed something wrong and then I want to come back, find the data I placed earlier and update the contents.
Is it possible or am I missing something?
Marcos
The simpliest way is to define 2 xf:submission.
One for the pre-load of the data of your form, you send it with something like this :
<xf:action ev:event="xforms-ready">
<xf:send submission="preload"/>
</xf:action>
the second one you'll use it when you need to save the datas (a save trigger is the most common use-case).
With this, when you come for the first time, your preload submission loads only blanks, your save submissions will save your instance. When you'll come back, this saved instance will be loaded by your 'preload' submission and you'll be able to modify your datas before submitting again.
Related
I want a form where the user can fill some values and then exit, and then come back in some time and complete the form and submit it. Is it possible with google forms? If so, will the data entered in the second session be saved along with the corresponding row in the spreadsheet or will a new row be entered?I hope my question is clear
Data from the Form only goes to the server when it is submitted, so you cannot store that form data before submission (disregarding any data that might have gotten stored in the browser session).
What you could do instead is select Settings and check the option Edit after submit. This way, a user can submit the Form and then come back later to edit the responses.
Reference:
Google Forms: Allow people to edit responses
maybe this will sound a bit weird but what I want to do is store the inputs of a modal form in variables such that those data is not saved on database but in a google-sheet instead. I have already configured succesfully loading data into google-sheets, so that is not a problem but I can not figure how to store the data of that modal form in variables out in the way that I dont have to create new records for that information because I will store it on google-drive instead. Can you suggest any idea to do this please?
I have a pretty extensive form on one of my rails sites and I was wondering if its possible to dynamically save the form for every onchange input. What I'm trying to prevent is users taking the time to fill the form out and then lose all their changes because of a connectivity issue or something stupid like that...
Any suggestions? Basically, I don't want the form to have to be submitted at all. I just want the form to save like a preference would in an Mac OS X (no apply or save button it just saves).
using rails 3...thanks!
The strain that would put on your server and DB would be several orders of magnitude higher than a more traditional approach. I also agree with Kyle that I would be very confused about the lack of submit button. At the very least, you'll need to notify users each time data is sent to the server and saved successfully, otherwise they'll have no idea why you aren't asking them to save.
Also, think about all the overhead. With every keystroke the user will have to initiate a connection, send their HTTP headers, cookies, the contents of the form, etc.
Have you considered an autosave feature instead? Maybe save the form every 2 minutes if changes have been made, and then put a submit button on the form as well? I think it would save you a great deal of pain, but get you almost the same benefit.
You could attach an ajax event to each input losing focus that would call the Controllers update method.
Most users would be surprised by this behavior though because it isn't the expected behavior of a web site.
If you use AJAX to call update, then here are a few things that might help: jQuery's serialize() function can help gather the form data into a post request without having to call the forms submit action. Using save(:validate => false) will bypass validation if you are saving drafts and want to skip validation until the final save.
I have a form where the user can choose options from a lot of select boxes. The form is used to register several items from an RSS feed. The user fills in the form, clicks create and is presented with the same form for the next item in the list.
Sometimes, the same options are valid for several items in the list, and I would like to be able to save some of the selections done so the user doesn't have to make the same selection for the next items.
What is the best way of doing this? I've identified four ways of doing it:
Sessions
Just keep the values in the session hash. This will of course work and is very simple, but I have some undefined feeling that it is a bad idea. It will also not work if the user is using the form from different tabs in the browser.
Cookies
Basically the same as keeping them in the session, I think.
Profile
Can't be done in this case I believe, since profiles are shared between several users.
Database
The most complex way I've come up with is to keep the information in the database and use a query parameter to keep track of which information should be used. This is probably overkill, but in some ways the best way to me. I don't like the idea of keeping this kind of state in session or cookies.
Am I missing some way? Or something?
If after filling first form, some data is saved to db (object is created) then you can use this data from db to fill up new form.
If after filling first form, nothing is saved to db, then you can create in memory some objects based on params from previous post and based on this (on just on params) you can prepare new form. But of course data from previous form should be added as hidden fields in second form.
I'd like to ask for a solution. For example we have a page. And I have a link to a another action from this page. I want to have an ability to save the values of entered data on the page.
For instance I go to another page enter data and go back. Like the wizard. But the problem is that we can come to the action from different pages. And it need to save several data types.
Is it understand?
Any suggestions?
I'd like to have common solution....
You could also use TempData to persist data between requests.
In the past for wizards I have used Session to store data as it gets built up along the way.
One thing to not forget is to validate the data you are storing in the session everytime you go to use it. If not a user can exploit the back button to fake certain scenarios. For example:
User uses the wizard and gets to step 3 in the wizard.
They then go to another page that is not part of the wizard.
Then the user enters the wizard again and
only gets to step 2 of the wizard.
User then uses the back button to go all
the way back to the original wizard
that they were on step 3 for.
In this case the data in your session if posted will think it came from the original wizard even though the data in the session is reflecting only up to step 2 from when the user accessed the wizard the second time. Use a unique key each time someone starts a wizard and validate it at each step.
Hope that helps and isn't too confusing (it was a bit to me typing it).
An alternative is to persist the data via the TempData but each time you will need to pull it out and persist it for posting back to the next step. Then rebuild it, add to it and repeat. This can be a lot of work as well but at least you don't have to worry about things happening out of synch.