Coder Social home page Coder Social logo

widget instead of format about liformbundle HOT 5 OPEN

limenius avatar limenius commented on June 21, 2024
widget instead of format

from liformbundle.

Comments (5)

nacmartin avatar nacmartin commented on June 21, 2024 1

@hpatoio there will always be information related with the UI that has nothing to do with the data model here. Otherwise we cannot build a form generator based on json-schema, because we will need more information apart from what is needed to simply describe the data.

from liformbundle.

nacmartin avatar nacmartin commented on June 21, 2024

Yes, this should be fixed. There are widgets like "textarea" that are only UI hints, but the case of email the rule should be stronger, not only a UI hint.

from liformbundle.

hpatoio avatar hpatoio commented on June 21, 2024

I faced the very same issue and I've already applied a patch in my local branch. Before opening a PR I want to share a couple of points:

  1. I think that widget should be completely removed from the response. It's an information related to the UI and thus it has nothing to do with the data model

  2. At the moment I only support email format. I will also add support for date related form but this open a space to discussion. According to this document http://json-schema.org/latest/json-schema-validation.html#rfc.section.7.3 datetime should be sent using the format YYYY-MM-DDTHH:MM:SS.FFFZ while date must have the format YYYY-MM-DD. This means that we should not consider the parameter format for the DateType and DateTimeType. See https://symfony.com/doc/current/reference/forms/types/datetime.html#format and https://symfony.com/doc/current/reference/forms/types/date.html#format

Are these 2 point ok for you ?

from liformbundle.

hpatoio avatar hpatoio commented on June 21, 2024

@nacmartin ok. What about the point 2 ?

from liformbundle.

hugoalexmartins avatar hugoalexmartins commented on June 21, 2024

Anyone knows how to change the key widget to format ?

Or how to solve this issue ?

I am using angular-schema-form to handle forms.
@hpatoio do you know how to sold this issue ?
Thanks in advance.

from liformbundle.

Related Issues (19)

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.