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

145
Visualizações
Change content of a w2ui html field

I have a w2ui popup form with a field definition is like this:

{ field: 'step', type: 'html',  html: { label: '', column: 'before', span: 0, html: "xx" } },

On runtime I want to change the content of that field. It is not (directly) based on a record, I would say it is an arbitrary html div. For the sake of simplicity let's say let replace the value "xx" with "coucou"

in the onOpen event ot the popup I'v tried the followings:

w2ui.DocForm.set('step', {html: {html: "coucou"}});

It didn't work, so I tried this:

w2ui.DocForm.fields[0].html.html = "coucou"

with and without w2ui.DocForm.refresh(); after that

The content didn't change. Any idea?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Finally I've found a solution. Once I've modified the html field like this: w2ui.DocForm.fields[0].html.html = "coucou", instead of calling refresh(), I had to call

w2ui.DocForm.formHTML = w2ui.DocForm.generateHTML();

That was the trick. I do not understand why it working this way, while for all the other record based fields on the other way, but at least it's working now.

about 4 years ago · Juan Pablo Isaza 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