Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to exclude a node in nodeCallback #67

Open
birarda opened this issue Jun 26, 2014 · 1 comment · May be fixed by #72
Open

Ability to exclude a node in nodeCallback #67

birarda opened this issue Jun 26, 2014 · 1 comment · May be fixed by #72

Comments

@birarda
Copy link

birarda commented Jun 26, 2014

Is there any way for me to force the exclusion of a node in my nodeCallback?

I have an attribute I'm setting on inputs when they change, and I can check for this in the nodeCallback, but I can't find anything to return that doesn't end up just adding unchanged elements to the object.

function cleanupFormValues(node) {  
  if (node.getAttribute && node.getAttribute('data-changed') === 'true') {
    if (node.type && node.type === 'checkbox') {
      return { name: node.id, value: node.checked ? true : false };
    } else {
      return false;
    }
  } else {
    return { name: '', value: null };
  }
}
@birarda
Copy link
Author

birarda commented Jun 26, 2014

For now I am hacking around this by setting the values I do not want included to disabled before calling form2js

@5im-0n 5im-0n linked a pull request Sep 4, 2014 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant