0

I've read that the solution to display 'Search' instead of 'return' in mobile is to have a form wrapper around an input element and set the type to 'search'. However, this doesn't work for textareas.

ie:

<html>
<body>
  <p>
  <form>
    <input name='search' type='search' placeholder="Input type is search" />
  </form>
</body>
</html>

What is the solution to get this to work in a <textarea />?

reectrix
  • 7,999
  • 20
  • 53
  • 81

2 Answers2

1

From another thread: Changing keyboard type for html textarea on iPad

I wasn't able to find a way to natively do this neither. In the past, we've been able to 'trick' the keyboard by setting a hidden input with the correct type, and pushing the resulting text into an alternate container, though we had headaches recreating the the user interactions, text caret, rendering, all just to avoid using the native keyboard.

At best, you're looking at an very impractical solution.

Daut
  • 2,537
  • 1
  • 19
  • 32
Prusprus
  • 7,987
  • 9
  • 42
  • 57
-1

Add the action parameter to the form element.

<form action=".">
  <input name='search' type='search' placeholder="Input type is search" />
</form>

See this answer - https://stackoverflow.com/a/26287843/4556503

Community
  • 1
  • 1
hopkins-matt
  • 2,763
  • 2
  • 15
  • 23