Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

82
Views
Ocultar campo de perfil si el Meta de usuario está en blanco - Wordpress

¡Buenas tardes a todos!

Me gustaría ocultar un campo de perfil si la meta del usuario está en blanco.

Por ejemplo, en la imagen, me gustaría ocultar la fila billing_ateco porque el campo billing_ateco está vacío.

ingrese la descripción de la imagen aquí

No tengo idea de por dónde empezar, si tiene la solución o me sugiere un hilo similar (no encontré nada en la sección de preguntas similares cuando publiqué esto) Sería de gran ayuda, ¡gracias de antemano!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Si por user meta se refiere a la entrada del usuario, un enfoque sería encontrar todos los elementos de entrada, verificar si su valor está vacío y luego ocultar su elemento tr principal.

 // Find all <input> elements: document.querySelectorAll("input").forEach( input =>{ // Check to see if the value is empty: if ( input.value.trim() === "" ){ // Find the closest <tr> parent of the input and // hide it: input.closest("tr").style.display = "none"; } });
 <table> <tr> <td> <label for="a">Label A</label> </td> <td> <input id="a" /> </td> </tr> <tr> <td> <label for="b">Label B</label> </td> <td> <input id="b" /> </td> </tr> <tr> <td> <label for="c">Label C</label> </td> <td> <input id="c" value="Value" /> </td> </tr> </table>

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!