Skip to content
This repository has been archived by the owner on Mar 7, 2021. It is now read-only.

Update targets don't get performed if their form target is hidden #85

Closed
3lvis opened this issue Nov 20, 2014 · 5 comments
Closed

Update targets don't get performed if their form target is hidden #85

3lvis opened this issue Nov 20, 2014 · 5 comments

Comments

@3lvis
Copy link
Owner

3lvis commented Nov 20, 2014

No description provided.

@3lvis
Copy link
Owner Author

3lvis commented Dec 10, 2014

This should be possible to fix now with the new methods on HYPFormsManager that can retrieve hidden fields too.

@3lvis
Copy link
Owner Author

3lvis commented Jan 28, 2015

HYPFormsManager

- (NSArray *)updateTargets:(NSArray *)targets withEnabled:(BOOL)enabled

    `if ([self.hiddenFieldsAndFieldIDsDictionary objectForKey:target.targetID]) continue;`

@jeffleeismyhero
Copy link
Collaborator

This seems to be a current issue. Can you confirm?

@3lvis
Copy link
Owner Author

3lvis commented Jul 15, 2015

@jeffleeismyhero is an issue as far as I know

@jeffleeismyhero
Copy link
Collaborator

Targets defined in hidden fields will fire with the change displayed below IF I switch to readonly and then back to readwrite.

screenshot 2015-07-15 15 54 33

The updated updatedIndexPaths array remains empty throughout. It would seem

Reference JSON:

{
  "groups":[
    {
      "id":"hidden_targets",
      "title":"Hidden Field Targets",
      "sections":[
        {
          "id":"hidden_targets_section",
          "fields":[
            {
              "id":"visible_quantity",
              "title":"Quantity",
              "info":"Displays 'hidden_quantity' value",
              "type":"float",
              "value":0,
              "size":{
                "width":20,
                "height":1
              },
              "formula":"$hidden_quantity"
            },
            {
              "id":"hidden_quantity",
              "title":"Secondary Quantity",
              "info":"Multiplies 'adjustment_field' by 2 and updates 'visible_quantity'",
              "type":"float",
              "value":0,
              "size":{
                "width":20,
                "height":1
              },
              "formula":"$adjustment_field * 2",
              "targets":[
                {
                  "id":"visible_quantity",
                  "type":"field",
                  "action":"update"
                }
              ],
              "hidden":true
            },
            {
              "id":"adjustment_field",
              "title":"Adjustment",
              "type":"count",
              "value":1,
              "size":{
                "width":20,
                "height":1
              },
              "targets":[
                {
                  "id":"hidden_quantity",
                  "type":"field",
                  "action":"update"
                }
              ]
            },
          ]
        }
      ]
    }
  ]
}

@3lvis 3lvis closed this as completed Jul 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants