lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Lynx-dev] Missing form tag attribute


From: Klaus-Peter Wegge
Subject: [Lynx-dev] Missing form tag attribute
Date: Sat, 28 May 2022 20:00:45 +0200 (CEST)

Dear Lynx dev team,

# Missing Form Tag Attribute

HTML5's button [formaction attribute]
https://www.w3schools.com/tags/att_button_formaction.asp
allows for buttons to point to another endpoint different than what main
form specifies. This way it is possible to avoid having lots of forms for
simple actions instead of just one big one, but currently CLI browsers such
as lynx ignore this attribute and try to send wrongly
data to form's main endpoint.

Example:
    ```html
    <form action="/main_action" method="post">
      <!-- ......... -->
      Item1<button type="submit" 
formaction="/remove_action?item1">Remove</button>
      Item2<button type="submit" 
formaction="/remove_action?item2">Remove</button>
      Item3<button type="submit" 
formaction="/remove_action?item3">Remove</button>
      <!-- ... -->
    </form>
    ```

The above example, buttons should send form data to /remove_action instead
of /main_action, the current and only workaround in  html is as stated
before, one form per possible action like:

    ```html
    <form action="/main_action" method="post">
      <!-- ......... -->
    </form>
    <form action="/remove_action?item1" method="post">Item1<button 
type="submit">Remove</button></form>
    <form action="/remove_action?item2" method="post">Item2<button 
type="submit">Remove</button></form>
    <form action="/remove_action?item3" method="post">Item3<button 
type="submit">Remove</button></form>>
    <!-- ... -->
    </form>
    ```

Which is suboptimal and hurts performance.

# Specification of Attribute

 * 
https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#attr-fs-formaction

Is it possible to improve lynx by supporting this attribute?

Many thanks

Klaus



reply via email to

[Prev in Thread] Current Thread [Next in Thread]