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

Hidden field not submitting #9

Closed
ghost opened this issue Jan 2, 2018 · 1 comment
Closed

Hidden field not submitting #9

ghost opened this issue Jan 2, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Jan 2, 2018

When submitting a hidden input field, the value does not get committed to the database. No errors occur in uProduce or the browser, code sample below:

<input type="hidden" name="answerTotal" id="answerTotal" xmp-write-ador="xmp.r['answerTotal']" value="0">

@Ohadcy
Copy link

Ohadcy commented Jan 3, 2018

Hello,

Note that when you place an ADOR reference using xmp-write-ador, then a two-way connection is created. This means that when the page loads, if the ADOR has also a "read" expression, the field is populated with its value. In case the value of retrieved ADOR is empty, you can use a xmp-default-value attribute which will be used to define an initial value to the referred write ADOR.

In your code:
<input type="hidden" name="answerTotal" id="answerTotal" xmp-write-ador="xmp.r['answerTotal']" xmp-default-value="0">

Regards,
Ohad Cohen

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