Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

267
Visualizações
"Please fill the required field" - Hidden field is blocking my submit

I have a wordpress page with buddyboss installed. The Pagebuilder is Elementor pro. The Plugin Buddyboss gives you Facebook like functions. In buddy boss, it's no problem to comment on posts &co, but if I have a post outside of the buddyboss system, I can't submit my comment. There's one hidden field that must be filled in order to submit my comment. Line of code

If I put in a script that targets the area by its Id and tries to delete it, it won't work. If I delete it manually, I can submit it. Do you guys have any idea?

Without the CSS that hides my Textarea it looks like this:

<textarea 
  id="aad669143d1a2b175fb447cb79a28f4b" 
  aria-label="hp-comment" 
  aria-hidden="true" 
  name="comment" 
  autocomplete="new-password" 
  style="" 
  tabindex="-1" 
  class="error" 
  aria-describedby="aad669143d1a2b175fb447cb79a28f4b-error" 
  aria-invalid="true">
</textarea>
about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Based on the code you posted in your comment, it turns out that targeting the aria-label might indeed be what you needed. In order to remove it, you would modify your code as follows:

var element_to_remove = document.querySelector('[aria-label="hp-comment"]');
element_to_remove.remove();

The first line finds the element based on the attribute aria-label and its value hp-comment, the second line removes it from the HTML tree (which should work in all modern browsers; alternatively, you could try the parentNode way you outlined).

You can try it using this extended code snippet:

var element_to_remove = document.querySelector('[aria-label="hp-comment"]');
console.log(element_to_remove.id); // the id is logged
element_to_remove.remove(); // remove the element
element_to_remove = document.querySelector('[aria-label="hp-comment"]'); // nothing here
console.log(element_to_remove); // --> null is logged
<textarea id="aad669143d1a2b175fb447cb79a28f4b" aria-label="hp-comment" aria-hidden="true" name="comment" autocomplete="new-password" style="" tabindex="-1" class="error" aria-describedby="aad669143d1a2b175fb447cb79a28f4b-error" aria-invalid="true">
</textarea>

(Of course, the lines 2, 4 and 5 are just for demonstrating and not really necessary.)

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda