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

requiredresponse branching logic + php jison port #8

Merged
merged 29 commits into from
Jul 19, 2017

Conversation

ZainVirani
Copy link
Collaborator

No description provided.

renderElement(element, index, data, onUpdate)
))
}).map((element, index) => {
if(element.Type === 'radio' || element.Type === 'text' || element.Type === 'checkbox' || element.Type === 'select') {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we declare all the input types near the top of the file, above the InstrumentForm definition:

const INPUT_TYPES = ['radio', 'text', 'checkbox', 'select', 'date'];

Then on this line you can do:

if (INPUT_TYPES.includes(element.Type) { ... }

return renderElement(element, index, data, onUpdate, required)
}
//if(required || required == "true") required = true;
//else required = false;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove plz

@jacobpenny jacobpenny merged commit 0dd007d into naiploris:cap-dev Jul 19, 2017
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 this pull request may close these issues.

2 participants