mercredi 12 septembre 2018

Domino Classic Web checkboxes unchecking when reloading a form

A Domino Classic Web Development question.

I have a form with a checkbox field in in, IsCustomerTX. The single choice of the checkbox is

Ich bin bereits Kunde|1

enter image description here

The form is submitted with

<input value="Reservation abschicken" class="f-submit" name="f-submit-button" type="submit">

I have a WebQuerySave Agent that catches the documentcontext and transfers the values to a back-end document docRes.

docRes.Salutation1TX = docContext.Salutation1TX(0)      
docRes.IsCustomerTX = docContext.IsCustomerTX(0) 'checkbox 'Ich bin bereits Kunde'
'Call docRes.ReplaceItemValue("%%Surrogate_IsCustomerTX", "Ich bin bereits Kunde")
docRes.IsCustomerTX = "Ich bin bereits Kunde" 'checkbox 'Ich bin bereits Kunde'
docRes.BirthdayTX = docContext.BirthdayTX(0)

In case there are some validations that are not satisfied, I display docRes with an URL parameter that makes the fields go red.

If I check the checkbox and submit the form: enter image description here

enter image description here

the field value gets sent correctly to the server.

However, when the page re-loads

enter image description here

the checkbox is unchecked.

You can see the effect on:

http://www.magermandemo2.ch/Development/webres/webres1_0/Webres_(1_0)_Dev.nsf/Address!open&resid=83BD3AB1A310C297C1258306003B185B&s=1

My expected behaviour is that the checkbox remains checked during the resubmit.

Many thanks for the help.




Aucun commentaire:

Enregistrer un commentaire