danielbeeke / rdf-form

RDF form provides rendered forms via a form definition provided in RDF turtle format.
http://rdf-form.danielbeeke.nl/
MIT License
15 stars 1 forks source link

Fixing deletion of readonly multiple #18

Closed phochste closed 2 years ago

phochste commented 2 years ago

This pull request fixes a use-case where a form element contains a combination of multiple and readonly. E.g. the :dates in the form below has form:multiple true and form:readonly true. This means that one shouldn't expect a (+)-button to add a new dates entry, nor one should expect a (x)-button to remove an existing dates entry.

:dates
   a form:Field ;
   form:binding ex:dates ;
   form:widget "group" ;
   form:group "participant" ;
   form:multiple true ;
   form:readonly true ;
   form:order 1 .

:date
   a form:Field ;
   form:binding ex:date ;
   form:widget "date" ;
   form:group "dates" ;
   form:label "Dec 1"@en ;
   form:required true;
   form:readonly true ;
   form:order 0 .

:confirm
   a form:Field ;
   form:binding ex:confirm ;
   form:widget "checkbox" ;
   form:group "dates" ;
   form:label "Confirm"@en ;
   form:required true;
   form:saveEmptyValue true ;
   form:order 1 .