• Resolved Lukasz

    (@wpfed)


    Example if you have two forms on a page, can you target them by ID, any hooks?

    <input type="search" id="wp-block-search__input-1" class="wp-block-search__input " name="s" value="title" placeholder="Search" required="">
    
    <input type="search" id="wp-block-search__input-2" class="wp-block-search__input " name="s" value="title" placeholder="Search" required="">

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Sumit Singh

    (@5um17)

    Hi,

    This is not possible because the field IDs are not sent to the server when form is submitted only name and value are sent no the IDs.
    Also, having the same name multiple fields does not make any sense, the only last field value will be sent to server.

    But if you are using two different forms then you can add a hidden field to target the search setting. Please refer to https://wpes.secretsofgeeks.com/settings#search-form

    Thanks

    Thread Starter Lukasz

    (@wpfed)

    Thank you!, I’m working on another solution but this is great for reference.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Target specific search form’ is closed to new replies.