Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: how to create a sub form type functionality and go back to main form #7

Closed
ikeamanual opened this issue Mar 14, 2015 · 1 comment

Comments

@ikeamanual
Copy link

Hi,

This is not really a Jsonform question, but a Javascript question about using forms ...

I have a jsonform custom select field with a datalist. If the user enters a unknown value, I want to present a new form so that he can enter more information about the new value.

I have created the new page with a new seperate Jsonform in newStoreForm.html.
When the user enters an unkown value I do:

window.location = "newStoreForm.html";

In the onSubmit() of the newStoreForm I do:

window.history.back(); return false;

I go back but all my previous info is gone and the original page is reloaded...
(By the way, I am running all this locally without a server in node-webkit http://nwjs.io/.)

Is there a way to achieve this functionality without manually storing the whole state of the main page and rebuilding it manually?

Maybe use the newStoreForm jsonform in jquery Dialog?
Any examples?

thanks,

Peter

@ulion
Copy link
Owner

ulion commented Mar 14, 2015

use modal dialog.

2015-03-14 21:06 GMT+08:00 ikeamanual notifications@github.com:

Hi,

This is not really a Jsonform question, but a Javascript question about
using forms ...

I have a jsonform custom select field with a datalist. If the user enters
a unknown value, I want to present a new form so that he can enter more
information about the new value.

I have created the new page with a new seperate Jsonform in
newStoreForm.html.
When the user enters an unkown value I do:

window.location = "newStoreForm.html";

In the onSubmit() of the newStoreForm I do:

window.history.back(); return false;

I go back but all my previous info is gone and the original page is
reloaded...
(By the way, I am running all this locally without a server in node-webkit
http://nwjs.io/.)

Is there a way to achieve this functionality without manually storing the
whole state of the main page and rebuilding it manually?

Maybe use the newStoreForm jsonform in jquery Dialog?
Any examples?

thanks,

Peter


Reply to this email directly or view it on GitHub
#7.

Ulion

@ulion ulion closed this as completed Jun 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants