Hello
I use relationship field with multiply select.
In CP all display ok with css and sctipts. Screen: http://goo.gl/nQ5i41
But in safecracker maybe display without css and js. Screen: http://goo.gl/t66Eq0
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
August 15, 2013 1:05pm
Subscribe [2]#1 / Aug 15, 2013 1:05pm
Hello
I use relationship field with multiply select.
In CP all display ok with css and sctipts. Screen: http://goo.gl/nQ5i41
But in safecracker maybe display without css and js. Screen: http://goo.gl/t66Eq0
#2 / Aug 16, 2013 7:08am
Hi Maxim,
Can you share your template code also which you are using for relationship field.
#3 / Aug 16, 2013 10:33am
{exp:safecracker
channel="{segment_1}"
id="safecracker"
return="/{segment_1}/URL_TITLE"
include_jquery="no"
datepicker="no"
error_handling="inline"
}
{if global_errors:count > 0}
<div class="message fail">
<ul>
{global_errors}<li>{error}</li>{/global_errors}
</ul>
</div>
{/if}
{if field_errors:count > 0}
<div class="message fail">
<ul>
{field_errors}<li>{error}</li>{/field_errors}
</ul>
</div>
{/if}
<ul class="fields-list">
<li class="field-title">
<label>Title</label>
<input type="text" name="title" id="title" value="{title}" maxlength="100" />
<input type="hidden" name="url_title" id="url_title" value="{url_title}" />
</li>
<li>
<label>Related shops</label>
{field:shop_relates}
</li>
<li>
<button type="submit" class="btn btn-submit">Submit</button>
</li>
</ul>
{/exp:safecracker}Jquery included in head of page
#4 / Oct 16, 2013 3:20pm
I attach again screenshot: http://goo.gl/sUaLZi
And I have this js error: ReferenceError: Can’t find variable: _
#5 / Oct 24, 2013 10:44am
Anybody help?
In CP relationships work ok, but on SAEF don’t work;
Screen: http://goo.gl/Oo9PGo
In firebug this error: ReferenceError: Can’t find variable: _
in this code:
(function(d) {
function i(a) {
this.root = d(a);
this.active = d(a + "-active");
this.searchField = d(a + "-filter");
this.activeMap = {};
this.listItems = this.root.find("li");
this.cache = _.map(this.root.find("label"), function(a) {
return d(a).text()
});
this.createItem = _.template(this.active.data("template"));
this.defaultList = _.object(_.range(this.listItems.length), _.map(this.listItems, d));
this.init()
}