GithubHelp home page GithubHelp logo

Comments (7)

davidlgj avatar davidlgj commented on May 10, 2024

Hi @jeremysolarz,

currently we don't support it. But it can easily be added. We just haven't had any use for them since we don't actually post the form but instead use angular's two way binding and send the data with an ajax request to the server.

from angular-schema-form.

mike-marcacci avatar mike-marcacci commented on May 10, 2024

Just to clarify, a hidden form field is supported because of how the default decorator works. Go ahead and try this here. Note, though, that you'll have to set the value on the model via some other mechanism, because afaik, the default property is ignored by Angular Schema Form.

Form

[
  {
    "key": "something",
    "type": "hidden"
  }
]

Schema

{
  "type": "object",
  "title": "Comment",
  "properties": {
    "something": {
      "title": "Something",
      "type": "string"
    }
  }
}

from angular-schema-form.

davidlgj avatar davidlgj commented on May 10, 2024

@mike-marcacci default is supported in the schema (but not the form def), does it not work for you?

Another way to prime with an id (if you don't want to put it in the schema) is to just add it to the model in your controller.

from angular-schema-form.

jeremysolarz avatar jeremysolarz commented on May 10, 2024

@davidlgj

Thanks the solution with only sending the model data via Ajax works for me.

from angular-schema-form.

davidlgj avatar davidlgj commented on May 10, 2024

@jeremysolarz great!

from angular-schema-form.

gaganmalhotra avatar gaganmalhotra commented on May 10, 2024

Hey @davidlgj ,
Does angular schema form also support conditional showing hiding form fields on certain select dropdown values. Currently I'm trying out using the condition property in Form array and changing its values as per the change in the select. Is there any other way to do it?

from angular-schema-form.

Anthropic avatar Anthropic commented on May 10, 2024

@gaganmalhotra you would use dynamic select add-on and retrieve the options from your server based on criteria.

from angular-schema-form.

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.