Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Storing settings hash #68

Open
mattlanham opened this Issue · 4 comments

4 participants

@mattlanham

Can you provide an example of how to store the settings hash so that it can be recalled and used as a template dynamically.

I have built an app that allows you to dynamically add field rows etc, but every time i try to save the hash it doesn't correctly store - perhaps it's just me being a Ruby noob.

I'd like to store the hash in a DB, or send it to a sever.

@clayallsopp
Owner

Gah this is a really hairy problem.

The way persistence works actually doesn't support templated rows (I confirmed this morning). I spent a few hours trying to make it fit but it'll take some time to re-think how persistence should work.

Basically persistence had a core assumption that the number of rows and sections would be equal between loading and saving forms, but adding fields will mess with that...

Sorry for the delay :(

@mattlanham

Yikes - sounds like a pain in the ass :) keep me updated if you ever find out a way of doing it

@matthewsinclair

FWIW - I'd second this one. It'd be brilliant if it was possible to use Formotion to create dynamic forms, and not just static forms defined from a hash. I can appreciate the difficulty of the persistence angle, but even if the form wasn't persistent, it'd be great if I could, say, provide a block that returns the nth row of the kth section, and then still get all of the other Formotion goodness.

@mordaroso
Collaborator

@mattlanham Could you check out the pull request #77 and tell me if this solves your problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.