Wappler Version : 3.3.6
Operating System : php or node
Expected behavior
When adding an input to a form, the name attribute should be able to be set to “action”
Actual behavior
The following input:
<input type="text" class="form-control" id="inp_action" name="action" aria-describedby="inp_action_help" >
produces the following request url:
https://wappler.uniqueideas.com/[object%20HTMLInputElement]
however, changing the name attribute to “operation”, works fine.
bpj
October 12, 2020, 8:59pm
2
You a similar issue if binding data in a form such as for dmx-bind:value if it is within a repeat. If the input name is the same as the binding e.g. <input type="text" name="somevalue" dmx-bind:value="somevalue">
it will produce an [object OBJECT] value. I had to give some SC fields aliases recently to overcome this.
Teodor
October 13, 2020, 7:13am
3
HI Ken,
You should not use names that are used for HTMLFormElement
properties. Here’s a list of these properties:
The HTMLFormElement interface represents a form element in the DOM. It allows access to—and, in some cases, modification of—aspects of the form, as well as access to its component elements.
So you need to be careful when using action
as an input name as it will collide with the value of the action
attribute of your form.
1 Like