Closed anthonymanzo closed 7 years ago
custom template code got cut off, here it is again:
<div class="form-group FIELD_GROUP_CLASS FIELD_ID">
<label for="FIELD_NAME">FIELD_TITLE</label>
<div class="input-div">
<input type="text" name="FIELD_NAME" value="FIELD_VALUE" class="form-control typeahead" placeholder="someone@salk.edu" autocomplete="off" spellcheck="off" data-source="adUsersEmail" data-select="typeaheadSelected">
<span id="help-text" class="help-block"></span>
<span id="error-text" class="help-block"></span>
</div>
</div>
(put three backticks)
@anthonymanzo Sorry, custom_template and template rendered code is not implemented for "CRUD" input. But, I'll se what I can do in next version.
Can I put the modal template rendered and helper somewhere else (client startup)? I’ve tried but Iron router or maybe blaze seems to be ignoring it.
On Dec 6, 2016, at 2:40 PM, Petar Korponaić notifications@github.com<mailto:notifications@github.com> wrote:
@anthonymanzohttps://github.com/anthonymanzo Sorry, custom_template and template rendered code is not implemented for "CRUD" input. But, I'll se what I can do in next version.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/perak/kitchen-examples/issues/49#issuecomment-265296435, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AH95W40VazRqSED_z2DRgeYpGJEuN2Y_ks5rFeRkgaJpZM4LF9eu.
The best you can do with this is to create "custom component" for entire form containing CRUD field.
@anthonymanzo Or see if you can tweak something in ~/.meteor-kitchen/templates/blaze/ui/bootstrap3/components/form.html
(and form.js
)
(be warned: your modifications will be overwritten after you install new version of meteor-kitchen).
Ok. Thanks.
On Dec 6, 2016, at 2:43 PM, Petar Korponaić notifications@github.com<mailto:notifications@github.com> wrote:
The best you can do with this is to create "custom component" for entire form containing CRUD field.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/perak/kitchen-examples/issues/49#issuecomment-265297166, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AH95WxX7kPFqyzWK6sLnOWTF-bu57mTUks5rFeUkgaJpZM4LF9eu.
@anthonymanzo BTW, if you modify template and make this thing work, please let me know, so I'll include it into next version. TNX.
Cleaning up the spaces in a json validator did the trick. Closing issue. Thanks
Hi, I haven't been able to apply "helpers_code" & "template_rendered_code" for crud items the way I can for other fields. I need this for the typeahead plugin (using https://github.com/sergeyt/meteor-typeahead). Here's how I have been implementing typeahead for other fields using the custom fields - In the component json -
"template_rendered_code": "Meteor.typeahead.inject(); Meteor.subscribe('adusers');", "helpers_code": "\"adUsersPersonCode\":function(){ return adUsersPersonCode(); }, \"typeaheadSelectedDeptHeadName\":function(event, suggestion, datasetName){ typeaheadSelectedDeptHeadName(event, suggestion, datasetName); }, \"typeaheadSelected\":function(event, suggestion, datasetName){ typeaheadSelected(event, suggestion, datasetName); }, \"adUsersEmail\":function(){ return adUsersEmail(); }",
Then in the field definition - `{ "name": "dept_head_person_code", "type":"string", "title": "Department Head Person Code", "required": true, "input": "custom", "input_template": "tt_name_person_code.html",And the custom template - `
Again, question is how typeahead helpers and code can be done for the 'crud items'. Here is what my crud items look like in the kitchen json -
{ "name": "contacts", "title": "Contacts", "type":"array", "input":"crud", "array_item_type":"object",Thanks for your awesome project. -Tony Any suggestions? I have tried registering the helpers globaly for the modals but can't get it to work.