Bill Henderson
asked on
iPad form submittals are breaking my CRM code - need to stop carriage returns
Hi,
We have a text area field in a form that some people fill out with their iPads. Unfortunately, if these users hit the Return key on their iPad keyboard when in this textarea field, it's saving a value (can't tell what it is - MSSQL just shows a linebreak in the db table) but this is breaking a javascript calendar grid we are using.
Bottom line, we would like to have the enter key, if press, just close the keyboard view and not insert any value into the text area for that keystroke.
Is this possible? Maybe with some kind of blur command that detects that particular keystroke?
Just not sure how to achieve this...
Thanks
Bill
We have a text area field in a form that some people fill out with their iPads. Unfortunately, if these users hit the Return key on their iPad keyboard when in this textarea field, it's saving a value (can't tell what it is - MSSQL just shows a linebreak in the db table) but this is breaking a javascript calendar grid we are using.
Bottom line, we would like to have the enter key, if press, just close the keyboard view and not insert any value into the text area for that keystroke.
Is this possible? Maybe with some kind of blur command that detects that particular keystroke?
Just not sure how to achieve this...
Thanks
Bill
To disable the enter key you can just add this to the textarea
onkeypress="if(event.keyCo de==13){re turn false;}"
To close the keyboard you would need to set focus somewhere else.
onkeypress="if(event.keyCo
To close the keyboard you would need to set focus somewhere else.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
@GaryC123 Thanks for the heads up. I hadn't seen that before and was trying to post something quickly from my phone. I'll add more explanation or link to a different site in the future.
@billium99 looks like @garyc123 answered but if you need more clarification let us know.
@billium99 looks like @garyc123 answered but if you need more clarification let us know.
Not sure how this will work in the iphone but to lose focus on the textarea, which should hide the keyboard
onkeypress="if(event.keyCo de==13){th is.blur(); return false;}"
All depends which solution you prefer.
onkeypress="if(event.keyCo
All depends which solution you prefer.
ASKER
Thanks Gary - trying today...
ASKER
Thanks for the help!
ASKER
Do you know how to do that?