allow all attributes for form ctrls #2

Open
opened 2025-02-20 09:34:22 +01:00 by martianh · 2 comments

hi again,

when i'm working with forms, i have repeatedly found myself having to implement my own form ctrls, because sbt doesn't allow me to specify all the attributes i need.

i have currently had to do:

  • value (set a default value)
  • autofocus (activate on page load)
  • required (can't be empty)
  • accept (for file types)
  • and they should also have the html5 validation attributes available (max/min, maxlength/minlength, pattern).

i wonder if the ctrl function could have a rest parameter and allow for a plist of further attributes? or is there some other way you have found to handle this? i don't think sbt should prevent access to any (common) html attributes.

hi again, when i'm working with forms, i have repeatedly found myself having to implement my own form ctrls, because sbt doesn't allow me to specify all the attributes i need. i have currently had to do: - value (set a default value) - autofocus (activate on page load) - required (can't be empty) - accept (for file types) - and they should also have the html5 validation attributes available (max/min, maxlength/minlength, pattern). i wonder if the `ctrl` function could have a rest parameter and allow for a plist of further attributes? or is there some other way you have found to handle this? i don't think sbt should prevent access to any (common) html attributes.
Author

i also had to implement my own form ctrl that contained a datalist for autocompletion. does sbt support that somehow?

i also had to implement my own form ctrl that contained a datalist for autocompletion. does sbt support that somehow?
Owner

Hi @martianh

thanks for your comment. You are right that some aspects about web forms are not yet available but should be. I don't know yet how a good interface could be to support attributes for form controls, but I will think about it.

A datalist is not yet available.

Cheers.

Hi @martianh thanks for your comment. You are right that some aspects about web forms are not yet available but should be. I don't know yet how a good interface could be to support attributes for form controls, but I will think about it. A datalist is not yet available. Cheers.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: marcuskammer/dev.metalisp.sbt#2
No description provided.