Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

147
Vistas
Hide HTML attribute value from users within input field - instantsearch custom search

I have a small issue with InstantSearch JS as I have custom code and decided to change the regular search widget to a Custom Search widget based on Algolia documentation.

I need to implement custom code that wasn't possible with a regular search widget - I couldn't access search functions to add the code I need.

The problem is that I'm also using custom code where add hidden attribute data-search-term which helps display initial results based on this term. But with the default search widget value of this term been all the time hidden, not visible within the input field but when I switched to the custom search widget value of this attribute is visible and each time when I type into input fields, it duplicates its content.

Des someone have the solution to this problem? How can I hide the value of this attribute from the input field so it will stay within DOM but will be hidden from the input for users?

<div id="searchbox" data-feed="widget" data-category="Test" data-search-term="Demo"></div>

Above is HTML, it has data-search-term. It passes this one into the input field that is generated by InstantSearch JS.

As a result of that data-search-term is visible within input. How can I hide it?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda