Ticket #363 (closed task: fixed)

Opened 3 years ago

Last modified 3 years ago

Validation classes not added to autogenerated autocomplete-control

Reported by: sdm Owned by: idbr
Priority: minor Milestone: 0.4
Component: modules/kauri-forms Version:
Keywords: autocomplete Cc: kauri-discuss@…

Description

In the forms sample page autocomplete-control.html, the autocomplete-control is defined as follows:

<dl kauri-idref="contact">
   <dt><label kauri-role="label"/></dt>
   <dd><input type="text" kauri-role="acinput"/></dd>
</dl>

To test the validation classes, I added a required validator to the "contact" field.

Using the above configuration, the valid/invalid class is added correctly to the dl-tag.

When I remove the predefined HTML, the autocomplete-control is now autogenerated, but no valid/invalid class is added after validation. The "Field is required" message is shown though. This problem was also briefly mentioned in one of the comments of #352

And if I define the autocomplete-control like this:

<dl>
  <dt><label kauri-idref="contact" kauri-role="label"/></dt>
  <dd><input kauri-idref="contact" type="text" kauri-              
       role="acinput"/></dd>
</dl>

, the autocomplete-control is autogenerated instead of being linked to the predefined HTML.

Attachments

diff.txt (2.1 KB) - added by idbr 3 years ago.
fix

Change History

comment:1 Changed 3 years ago by idbr

  • Owner changed from mpo to idbr
  • Status changed from new to accepted

comment:2 Changed 3 years ago by idbr

The problem is that there's no element in the Autocomplete-control defined for the role 'mark'. Normally, this role defaults to the element 'input' (in Control.prototype._initElements), but this one is also empty (the input-role is called 'acinput' here).

Changed 3 years ago by idbr

fix

comment:3 Changed 3 years ago by idbr

  • Status changed from accepted to closed
  • Resolution set to fixed

(In [1759]) Kauri-role changed from acinput to input.
Fixes #363

Note: See TracTickets for help on using tickets.