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

Custom checkbox templates, {atts} has no id #1074

Closed
paulgrieselhuber opened this issue Jul 6, 2015 · 3 comments
Closed

Custom checkbox templates, {atts} has no id #1074

paulgrieselhuber opened this issue Jul 6, 2015 · 3 comments

Comments

@paulgrieselhuber
Copy link

Hello, I'm having trouble getting my custom checkbox to work, because the checkbox label has no 'for' attribute when rendered, because {{atts}} has no ID.

In my #autoForm template:

{{> afFieldInput name='doJournal'}}

Then I created the template I want to use:
`

{{afFieldLabelText name=this.name}}
`

In my JS I have:
AutoForm.setDefaultTemplateForType('afCheckbox', 'mCheckbox');

Template.afCheckbox_mCheckbox.onRendered(function() { m = Template.currentData(); console.log('current data', m); });

And the result of the console log:

atts: Object: data-schema-key: "doMaxMinAvg" name: "doMaxMinAvg

So as you can see, there is no ID in {{atts}} for this template

Is this a bug or something I'm not doing properly?

@paulgrieselhuber paulgrieselhuber changed the title For custom checkbox templates, {atts} has no id Custom checkbox templates, {atts} has no id Jul 6, 2015
@boustanihani
Copy link

I am also experiencing missing IDs when defining custom input types...

@rafaelcorreiapoli
Copy link

+1

1 similar comment
@shyaaam
Copy link

shyaaam commented Feb 13, 2016

+1

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

5 participants