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

Allow setting of JSON injected values to the raw_value tag for the generated HiddenTextFactory View #387

Open
allan-on opened this issue Mar 17, 2020 · 0 comments
Assignees

Comments

@allan-on
Copy link
Contributor

When injecting values into a form by setting the value(s) for hidden fields, for instance by doing valueMap.put("age_in_months", String.valueOf(months)); the values are written into the form JSONObject but aren't set in the (R.id.raw_value) tag for the hidden view generated by the HiddenTextFactory
In effect, this leads to the injected values being overwritten with empty values when saving the form or navigating between steps in the form.
The JsonFormFragmentPresenter#validateAndWriteValues() writes the empty values retrieved at String rawValue = (String) editText.getTag(R.id.raw_value);
Those values are set by a GenericTextWatcherwhich isn't invoked when you inject values prior to loading the form.

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

1 participant