path: root/forms-psuedocode.txt
diff options
authorAdrian Cochrane <>2020-04-27 16:22:06 +1200
committerAdrian Cochrane <>2020-04-27 16:23:28 +1200
commit5710d55379b7a333825fdab6658545e4ad880895 (patch)
treeeb5cb885494d6e9aa9b8c7112acba8aa66db3af9 /forms-psuedocode.txt
parent125865477e9e86029669719b1b3bb3e35c81ed2f (diff)
Plan form handling.
Diffstat (limited to 'forms-psuedocode.txt')
1 files changed, 47 insertions, 0 deletions
diff --git a/forms-psuedocode.txt b/forms-psuedocode.txt
new file mode 100644
index 0000000..1893288
--- /dev/null
+++ b/forms-psuedocode.txt
@@ -0,0 +1,47 @@
+How do HTML5 forms lower to prompts?
+Element Required? free-form? ngrams editable? options multiple? Notes
+text/search @required Yes from page !@readonly || !@disabled ref'd by @list No
+radio @required No - ... inputs sharing name No <label> refers to individual options instead.
+checkbox (1)@required No - ... Yes/No/synonyms No
+Checkbox @required No - ... inputs sharing name Yes <label> refers to individual options instead.
+submit No No - Yes None No Target read as METHOD ACTION, labelled by @value or innertext.
+<select> @required No - !@readonly || !@disabled child <option>s @multiple
+<textarea> @required Yes from page !@readonly || !@disabled None Yes
+button UNSUPPORTED (requires JavaScript)
+<legend> Yes (shows) No - No None No Serves purely as a label.
+<output> No Yes None No None No Requires JS, but it'd be nice to have an alternative.
+password @required Yes None !@readonly || !@disabled "New password" No Obscured in output.
+reset No No - Yes None No Links to current form (unfilled).
+color @required No - !@readonly || !@disabled CSS3 color keywords No Benefits from a system dialog, given it's inherantly a visual concept.
+date @required Yes day/month/year/ago ... "Today" No Reprocessed into ISO date.
+datetime-local @requiredYes day/month/year/hour/minutes ... "Now" No Reprocessed into ISO date.
+email @required Yes @/./alphadigit/etc ... @multiple spaces removed, instantiates punctuation
+file @required Yes (custom recognizer) ... @multiple Benefits from system dialog
+month @required Yes month/year ... "This month" No Reprocessed into ISO date
+number/range@required Yes digit ... No
+tel @required Yes digits (ignore -) ... No
+time @required Yes digits/am/pm ... "Now" No Reprocessed into ISO time.
+url @required Yes browser history/alnum/punctuation ... bookmarks No spaces removed, instantiates punctuation, infers https
+week (AS PER date, reprocessed)
+@value - prefilled value, if set removes from initial prompts.
+@readonly/@disabled - disables editting, removes from initial prompts.
+@size - IGNORED
+@maxlength - postprocessing validation
+@min/@max - postprocessing validation
+@multiple - sets this prompt to repeat until user says "next".
+@pattern - gives hint as to punctuation to expect, postprocessing validation.
+@placeholder - fallback for <label>
+@required - adds to initial prompts. If none are required it'll consider all inputs required.
+@step - prostprocessing validation.
+@autofocus - triggers this form mode.
+@height/@width - IGNORED
+@list - sets named options.
+@autocomplete - IGNORED, always autocompletes.
+Be nice to let inputs their own ngrams/vocabulary!
+@formaction, @formenctype, @formmethod, @formtarget - where to send form data.
+@formnovalidate - disables postprocessing validation.
+Be nice to let forms link to newline seperated "phrases" which can be used to fill in multiple inputs simultaneously, more conversationally.