Setting text field value to empy an string returns single quotes instead of the empy string

======== TEMPLATE BUG FORM ========

Wappler Version : 3.9.2
Operating System : MAC 11.2.3
Server Model: NodeJS
Database Type: MySQL 8
Hosting Type: Docker

Expected behavior

What do you think should happen?

When setting the text field dynamic event Value to empty string '' the text filed should be empty.

Actual behavior

When setting a text value to empty string it should be empty not showing the single quotes as the string.

How to reproduce

Create a modal and add in a text field and follow the process below to set the value of the text filed after the action.

Follow the process here to set the value of a text field after a dynamic event: https://docs.wappler.io/t/working-with-arrays/7701#Tags-Input-Setup

The result is as shown in the image below.

text value

Work around is to go to the code view and remove the codes entered in by Wappler: .setValue('\'\'') and replace with the correct value .setValue('')

How do you set the empty string in the dynamic event?
Do you enter it in the UI like ' ' (with the quotes)? You should enter just an empty space there, no quotes.

Hi @Teodor tried that but won’t accept an empty space.

I was following the instructions in the Wappler Tutorial.

Cheers

Well the tutorial was made prior the new data picker was introduced in version 3.
Now it’s different, what you enter by hand there is considered a string. Either enter an empty space (hit the space button of your keyboard) with no quotes around, or click the data picker:

Switch to code mode and enter '' there:

That’s the way to work with the data picker now (since the release of version 3… )

1 Like

Ah ok makes sense. Thanks and useful instructions!

1 Like

This has been improved in Wappler 5.2.1 - now you can leave the value input empty, when setting a value, so you don’t have to add an empty space in code view.

This topic was automatically closed after 46 hours. New replies are no longer allowed.