Skip to content

Labels still visible on hidden fields using quickForm #89

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

Open
mynameiskyleok opened this issue Oct 15, 2015 · 1 comment
Open

Labels still visible on hidden fields using quickForm #89

mynameiskyleok opened this issue Oct 15, 2015 · 1 comment

Comments

@mynameiskyleok
Copy link

The field itself is hidden, however the field label itself still shows (see screenshot) using the following schema definition:

collectionName.attachSchema(new SimpleSchema({
    fieldName: {
        type: String,
    },
    fieldName2: {
        type: String,
        autoform: {
            type: 'hidden'
        }
    }
}));

materialize-boilerplate-error

@mynameiskyleok
Copy link
Author

I'm still not sure if this is a bug or a versioning thing with meteor-autoform, but according to the meteor-autoform documentation (http://autoform.meteor.com/types --> select 'hidden' from dropdown), this is how you create a hidden field with a schema:

{
    typeTest: {
        type: String,
        optional: true,
        autoform: {
            afFieldInput: {
                type: "hidden"
            }
        }
    }
}

However, I've found that if you remove the javascript afFieldInput object and place the javascript type: "hidden" property directly in the javascript autoform object, the field is successfully hidden:

{
    typeTest: {
        type: String,
        optional: true,
        autoform: {
            type: "hidden"
        }
    }
}

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

No branches or pull requests

1 participant