Jump to content
  • 0

Don't want "NULL" in form field


acer71
 Share

Question

I'm passing parameters to a DataPage form via URL from an external source. Some of the parameters are empty. These show NULL in the text fields. I would like to have these fields just empty. How can I do that?

To Datapage:

http://b3.caspio.com/dp.asp?AppKey=a388 ... .fullname@

I have this script but not sure if this is the way to go, or how to implement it ($_Get)???:

function getQuerystring(key, default_)

{

if (default_==null) default_="";

key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");

var regex = new RegExp("[\\?&]"+key+"=([^]*)");

var qs = regex.exec(window.location.href);

if(qs == null)

return default_;

else

return qs[1];

}

Thanks!

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Snippets of JavaScript, HTML or CSS can be added in HTML Blocks (https://howto.caspio.com/datapages/datapage-components/html-blocks/) & Header and Footer (https://howto.caspio.com/datapages/datapage-components/datapage-header-and-footer/).

On 3/27/2009 at 7:30 PM, acer71 said:

Thanks Bahar!

It's not on your side...the program I'm passing the variable from inserts the NULL...

Can a script like the one I posted above be implemented via an HTML Block?

Thanks!

acer71

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...