I read local_forms, can be used to save the data offline. can you please throw more light on how to proceed? I m currently fetching nodes. create / save nodes. how can this be done using local_forms or LocalStorage? can you please provide code samples i can follow?

Comments

afidegnum created an issue. See original summary.

tyler.frankenstein’s picture

Priority: Major » Minor

Please stop prioritizing everything as major. With open source software you need to learn to be patient, or take action into your own hands.

afidegnum’s picture

please accept my apologies for that, i just wanted to grab an attention.

tyler.frankenstein’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev
Priority: Minor » Normal
Status: Active » Postponed (maintainer needs more info)
Issue tags: -drupalgap, -mobile, -phonegap

The local forms module you should just be able to enable it in your app, and it should work, see its README file for more information. Admittedly this module needs some love, before I would use it in production, but the ground work is laid out.

As for local storage, that is built into jDrupal for Entity retrieval and Views JSON, meaning if you enable it in settings.js, entities and views json will be cached in local storage when they are loaded, so subsequent loads don't need to go out to the server (until the local copy expires).

afidegnum’s picture

thanks for your response, What's the best to use? to be able to create a node locally, when there is no connectivity to the remote drupal site?

tyler.frankenstein’s picture

Local forms.

afidegnum’s picture

so for node entry

drupalgap.settings.local_forms = {
forms: ['node_edit']
};

drupalgap.settings.local_forms = {
forms: ['node']
};

which one is the correct one?

afidegnum’s picture

ok, when applied local_form to the node id, there is no response and the menu does not submit,

when applied to the user login form, I had a CSRF validation error, the for does not submit too but while refreshing the page, i have an infinite pop of alert message as the user is already logged in.

can you please help look into this?

tyler.frankenstein’s picture

Status: Postponed (maintainer needs more info) » Postponed

I appreciate you testing this and digging deeper into it. Personally, I don't need this with any urgency, nor do any of my clients so I won't be digging into any code for this one until an undetermined time. Until then I continue to encourage any contributions towards resolving this commonly requested feature, and continued contributions towards the work that has already been done.