Wappler Version : W7 Beta 16
Operating System : Win 11
Server Model: PHP
Database Type: Docker cloud
Hosting Type: local PHP server
Expected behavior
What do you think should happen?
Item should be added
Actual behavior
What actually happens?
When having an item in a list for tagify with 2 or more spaces at the end it cannot be added
Tagify code
<input type="text" class="form-control" id="inp_tgs" name="tgs" aria-describedby="inp_name" placeholder="Enter name" is="dmx-tagify" dmx-bind:data="serverconnect1.data.query" tag-value="to_name" tag-text="to_name" max-items="50" min-chars="0">
Data
See video
Similar issue I reported here.
@patrick This is happening to me as well. It appears to happen when there is a space at the beginning or end of the value for the tag-text runtime element.
@bpj and @mebeingken , could you see if that is the cause for you?
As an example, the First Name has a space at the end. If I remove it, then the form submits successfully. If I add it back it gets the error. I've validated with multiple records and this happened consistently.
[image]
1 Like
sid
January 25, 2025, 5:57am
4
Have seen the same on NodeJS as well. Never reported it though.
In my case list data comes from a source - no custom text - so just adding trim was good enough.
Yes, i am trimming on save to db but can you not apply trim() to the tagify data bindings?
patrick
January 27, 2025, 10:39am
6
I tried to replicate but it worked fine for me. Will do some more testing later.
Can you try the following, instead of to_name
as value use id
, like tag-value="id"
. Want to know if the trailing spaces is affecting the value or the tag text.
Also there is a No Trim
option, it seems that default tagify internally trims the values. You can add notrim="true"
. Perhaps the internal trimming and the non trimmed data source are the problem since the values do then not match.
Please let me know if you tried the above, it will help me finding the issue.
Adding
notrim="true"
had no effect however changing
tag-value="to_name"
to
tag-value="id"
did work so i guess the issue is with the value
Please test following update: dmxTagify.zip (9.9 KB)
That seems to have fixed it thanks.
@patrick does the update fix this issue as well with tag-text?
@patrick This is happening to me as well. It appears to happen when there is a space at the beginning or end of the value for the tag-text runtime element.
@bpj and @mebeingken , could you see if that is the cause for you?
As an example, the First Name has a space at the end. If I remove it, then the form submits successfully. If I add it back it gets the error. I've validated with multiple records and this happened consistently.
[image]
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
Teodor
January 30, 2025, 4:17pm
12
Fixed in Wappler 7 beta 17