Im new to using AMP and was wondering how I could auto focus to a form input when a button is clicked.
But because I can’t add script I’m not sure how to approach this.
Also I’m using wordpress and the 2 plugins AMP by automattic and Accelerated Mobile Pages by Ahmed Kaludi, Mohammed Kaludi.

this is the button:

<button on="tap:search-icon">
    <i class="icono-search"></i>

this is the input I want to autofocus:

<input type="text" placeholder="Type here" value="" name="s" id="s" class="user-valid valid">


Read more here: Auto focus to an input when a button is clicked (For AMP articles)


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: