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

153
Views
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 answers
Answer question

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 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!