Jump to content
  • 0

Plus symbol received as white space


Mylene

Question

Hi everyone,

I pass parameters in query string from one datapage in another. There is a problem with passing + in the phone field. The + always replaces with white space. 

I found this topic: http://stackoverflow.com/questions/1005676/urls-and-plus-signs

It seems that I need  to use java script code to fix this issue.

Can anyone help?

Thanks!

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hi Mylene, 

You may replace a white space with '+'.

Add header/footer to the submission form, disable html editor in the footer and add the following script:

<SCRIPT LANGUAGE="JavaScript">

 function concatenate()
 {
 
   var x = document.getElementById("InsertRecordYour_field").value;

   var y=x.replace(" ","+");
document.getElementById("InsertRecordYour_field").value =y;
 }


 document.getElementById("caspioform").onsubmit=concatenate;

</SCRIPT>

You need to replace Your_field with name of your field. Also please note, the plus (+) will be added onsumbit event, so on the form you will see phone number without plus, however value will be saved with + in the table. 

Hope it helps!

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...
×
×
  • Create New...