Forums

strip spaces from input field

glens1234 28 Aug, 2012
Hi. I need to strip the spaces from an input field. Any idea how to do this?

Im using the "Custom forms HTML code" and therefore i cannot do this in the wizard.

Thanks
GreyHead 28 Aug, 2012
Hi glens1234,

Do you need to strip them after the form is submitted? Then use a Custom Code action in the On Submit event.

Bob
glens1234 28 Aug, 2012
ok thanks. so i add a custom code action to the onsubmit event. Do i simply add the javascript code here? Do you have any idea about what code i can use? Can i use jquery? thanks again
GreyHead 28 Aug, 2012
Hi glens1234 ,

I'm lost - what exactly do you need to do?

JavaScript won't work in the On Submit event, you'd use PHP there.

Bob
glens1234 28 Aug, 2012
its ok im lost too. Im just trying to remove any blank spaces which may be entered into an input box. I don't care if this is server-side or client-side. Whatever is easiest. Im not a coder so if you know of anything that i can copy and paste that would be great.

Thanks.
This topic is locked and no more replies can be posted.