DMXzone App Connect Support Product Page
How to print data binding with NULL value as nothing
Asked 29 May 2017 00:21:02
1
has this question
29 May 2017 00:21:02 Firdaus Rohman posted:
Hi, I just realised in recent update, the data binding with NULL value is printed as 'null' text. How to output it as nothing or no value at all? In my data insert form, there's an optional text area which I set default value as NULL if there's no value inserted. In the update form, the form element with NULL value is outputted as 'null' text instead of nothing. How to fix this? I don't want when my user update the form the NULL value will be updated to 'null' text in database. Note that what I need is NULL value not data element with empty or ' ' value. Replies
Replied 29 May 2017 07:32:16
29 May 2017 07:32:16 Teodor Kuduschiev replied:
Hello Firdaus,
What is your database? How are you binding the value in the input?
What is your database? How are you binding the value in the input?
Replied 29 May 2017 08:00:43
29 May 2017 08:00:43 Firdaus Rohman replied:
Mysql: Text and another is varchar.
I bind the input with dmx-bind:value="record.data.value"
I bind the input with dmx-bind:value="record.data.value"
Replied 29 May 2017 08:06:05
29 May 2017 08:06:05 Teodor Kuduschiev replied:
Just tested with varchar field with mysql database and can't seem to be able to reproduce this. Please send us a link to your page.
Replied 29 May 2017 09:19:25
29 May 2017 09:19:25 Firdaus Rohman replied:
Hi Teodor. I also have tried to replicate it on a new page and it seems ok. In the case like this, how do I fix the issue? It was also ok before I update the extension and the new ones are loaded and copied to web folder.
Replied 29 May 2017 09:36:04
29 May 2017 09:36:04 Teodor Kuduschiev replied:
Please provide a link to your page, so we can check it. I cannot tell you how to fix it until i see what does your server return exactly ...
Replied 29 May 2017 09:58:01
29 May 2017 09:58:01 Firdaus Rohman replied:
Teodor, I've just sent you an email to
Thank you in advance.
Thank you in advance.
Replied 30 May 2017 10:46:45
30 May 2017 10:46:45 Firdaus Rohman replied:
Hello there, I'm still waiting for follow up.
Replied 30 May 2017 10:57:49
30 May 2017 10:57:49 Teodor Kuduschiev replied:
Hi Firdaus,
We will contact you as soon as we find what is wrong on your page.
We will contact you as soon as we find what is wrong on your page.
Replied 07 Jun 2017 13:55:21
07 Jun 2017 13:55:21 Firdaus Rohman replied:
it's been 10 days
Replied 07 Jun 2017 14:03:23
07 Jun 2017 14:03:23 Teodor Kuduschiev replied:
Hi Firdaus,
The login you sent earlier does not appear to work, and we need it working to inspect the issue...
The login you sent earlier does not appear to work, and we need it working to inspect the issue...
Replied 07 Jun 2017 14:09:58
07 Jun 2017 14:09:58 Firdaus Rohman replied:
Most files in the website are confidential I shouldn't enable your access for many days. I just re enabled the account. Hopefully there'll be a solution soon.
Replied 07 Jun 2017 14:11:05
07 Jun 2017 14:11:05 Teodor Kuduschiev replied:
Please just keep the account enabled, until we resolve your issue. No one from DMXzone is going to destroy your site ...
Replied 13 Aug 2017 07:05:42
13 Aug 2017 07:05:42 Reinhardt Ellis replied:
Am I also missing something here...
Created an database structure with fields NAME and CALLME
Then I have a INSERT FORM with NAME and CALLME fields.
I ONLY use then fill in the NAME and hit the insert button.
It then populates the database...
Name as "Name entered"
Callme as "NULL" as it was not filled in and the database structure sets this as 'NULL'
Then I have an UPDATE form.
<input name="name" type="text" id="name" dmx-bind:value="data_detail1.data.name">
This renders the data as "NAME" because there is a value in the NAME field.
<input name="callme" type="text" id="callme" dmx-bind:value="data_detail1.data.callme">
This renders the data as "NULL" ... displaying the NULL in the field as a value... and not actually rendering a "BLANK" value.
Even if the database says 'NULL' then it should not display NULL even if its NULL i hope that makes sense..
Created an database structure with fields NAME and CALLME
CREATE TABLE `test` ( `id` int(65) NOT NULL, `name` varchar(255) DEFAULT NULL, `callme` varchar(255) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; ALTER TABLE `test` ADD PRIMARY KEY (`id`); ALTER TABLE `test` MODIFY `id` int(65) NOT NULL AUTO_INCREMENT;
Then I have a INSERT FORM with NAME and CALLME fields.
I ONLY use then fill in the NAME and hit the insert button.
It then populates the database...
Name as "Name entered"
Callme as "NULL" as it was not filled in and the database structure sets this as 'NULL'
Then I have an UPDATE form.
<input name="name" type="text" id="name" dmx-bind:value="data_detail1.data.name">
This renders the data as "NAME" because there is a value in the NAME field.
<input name="callme" type="text" id="callme" dmx-bind:value="data_detail1.data.callme">
This renders the data as "NULL" ... displaying the NULL in the field as a value... and not actually rendering a "BLANK" value.
Even if the database says 'NULL' then it should not display NULL even if its NULL i hope that makes sense..