Git Product home page Git Product logo

Comments (5)

bhch avatar bhch commented on May 24, 2024 1

Hello, thank you for reporting this issue.

I've found the cause of the issue. It only happens on top-level arrays. If the array is nested inside an object or another array, then everything works fine.

I will fix this soon and release a new version by the end of this week.


Regarding changing the size of the input, you'll have to provide a CSS file with your custom styling through admin's or form's Media class.

Also, using widget.attrs will only affect the outer container of the JsonFormWidget. But it seems you want to change the size of the input field. In that case you'll have to provide a custom CSS file.

There should be a more elegant solution for custom styling and I'll see what can be done about it.

from django-jsonform.

zN3utr4l avatar zN3utr4l commented on May 24, 2024

if I wanted the fields in the multiselect to change dynamically based on another field, i.e. I choose the country of Italy in select1 and in select2, which would be an array field of django-jsonform, all the [{'label': Rome, 'value': 1}, ....]
would dynamically choices be possible? because I imagine that having a fixed schema for the widget this is not possible, the only way I can think of is to override where the select choices are checked in the schema.

To load the dictionary ​​'label' and 'value', could it be done with JQuery or JS, or could it be done somehow with this package?

from django-jsonform.

bhch avatar bhch commented on May 24, 2024

Currently, that is not possible.

But I will expose some methods and events to control the form widget using JS. This would allow for dynamically modifying the schema in the browser and updating the widget.

from django-jsonform.

zN3utr4l avatar zN3utr4l commented on May 24, 2024

Ok thanks, so I'm looking forward to this weekend for the top level array fix and future updates for dynamic array loading

from django-jsonform.

bhch avatar bhch commented on May 24, 2024

Fixed in v2.11.0. Please upgrade.

I've also implemented a basic JavaScript API which will allow you to dynamically modify the schema in the browser.

from django-jsonform.

Related Issues (20)

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.