Coder Social home page Coder Social logo

Comments (14)

3lvis avatar 3lvis commented on July 20, 2024

I'm afraid I don't understand, what do you mean by "object of key values"?

Could you provide a sample of the API you would like to have?

from form.

zenangst avatar zenangst commented on July 20, 2024
{
    "id":"target_id",
    "type":"field",
    "action":"update",
    "target_value":{
        "required":true,
        "value": "$other_date_field",
        "minimumDate":"$other_date"
    },
    "condition":"$conditional_value == 2"
 }

from form.

zenangst avatar zenangst commented on July 20, 2024

Also, it would be neat if it supported the $ delimiter to fetch values from foreign fields

from form.

3lvis avatar 3lvis commented on July 20, 2024

Looks useful :)

from form.

zenangst avatar zenangst commented on July 20, 2024

But calling it target_value no longer makes sense.

from form.

3lvis avatar 3lvis commented on July 20, 2024

Definetly

from form.

3lvis avatar 3lvis commented on July 20, 2024

I guess you could do

{
    "id":"target_id",
    "type":"field",
    "action":"update",
    "required":true,
    "value": "$other_date_field",
    "minimum_date":"$other_date"
    "condition":"$conditional_value == 2"
 }

from form.

fespinoza avatar fespinoza commented on July 20, 2024

in that example: if condition is fulfilled then the target_id field will set: a value, a minimun date and make the field required, right?

so the semantic of target_value would be like All the actions that happen when the condition is fulfilled

from form.

zenangst avatar zenangst commented on July 20, 2024

@fespinoza something like that yes.

from form.

fespinoza avatar fespinoza commented on July 20, 2024

I prefer the syntax that @zenangst posted, about the field name, can be changed for something like target_transformations or something

from form.

3lvis avatar 3lvis commented on July 20, 2024

A target is an element that triggers an action over a field or a section.

In that idea I think we could make target inherit from a field, so it has all the elements of a field but with the additional powers.

from form.

zenangst avatar zenangst commented on July 20, 2024

@NSElvis HYPFormTarget already has a property called value.

from form.

3lvis avatar 3lvis commented on July 20, 2024

@zenangst: naming would just be a detail I guess, everything else should work.

from form.

3lvis avatar 3lvis commented on July 20, 2024

No new features for now, let's reconsider after the bug fixes have being fixed.

from 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.