Git Product home page Git Product logo

Comments (4)

vitmalina avatar vitmalina commented on July 25, 2024

The grid and form can be created in memory and then rendered into the main panel.

$().w2grid({ name: 'grid' });
$().w2form({ name: 'form' });
// ...
w2ui.app_layout.content('main', w2ui.grid);
// or
w2ui.app_layout.content('main', w2ui.form);

from kickstart.

henriquemeira avatar henriquemeira commented on July 25, 2024

Thank you vitmalina!

Can you suggest how can I use the "grid.columns" to build a form?

I see the examples in http://w2ui.com/web/docs/form and I realized that "form.items" represent the technical data of the form, such as ID, SIZE, TYPE, etc., but nothing about caption, style, etc., this information should be build by HTML.

I would like to reuse the style/items/columns/etc from "grid" to build the form. Is it possible? Any idea?

tks.

from kickstart.

vitmalina avatar vitmalina commented on July 25, 2024

Ye, as of 1.3 you can specify additional items and then if form has not HTML, it will generate it. See generateHTML in the form. When you add columns do this

{ field: 'name', type: 'text', html: { caption: '...', attr: '', span: 1, page: 0 }}

Generation is only called when you do $('...').w2form(form-config) and when there is no formURL, formHTML and inside container there is no HTML.

No documentation yet, but this week I am working on it.

from kickstart.

henriquemeira avatar henriquemeira commented on July 25, 2024

Great! I'll try it out.

from kickstart.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.