Note that there are some explanatory texts on larger screens.

plurals
  1. POPlone Dexterity RelationChoice widget clashes with jQueryUI?
    text
    copied!<p>A RelationChoice widget in my custom type works fine until <code>collective.js.jqueryui autocomplete</code> is enabled and then it stops working ie stops doing relation lookups; nothing happens when you type in the field.</p> <p>(In another part of the site I use <code>collective.js.jqueryui autocomplete</code> with Google Maps API to return address suggestions as the user completes an address field.)</p> <p>The current workaround is to disable <code>collective.js.jqueryui autocomplete</code> when i want to use the RelationChoice widget (and re-enable afterwards). Not a good solution.</p> <ul> <li>Plone 4.2.1.1</li> <li>collective.js.jqueryui 1.8.16.9 (also tried 1.10.0.1 - same clash)</li> <li>plone.app.dexterity 1.2.1</li> </ul> <p>Independantly:</p> <ul> <li>If i only enable <code>plone.formwidget.autocomplete/jquery.autocomplete.min.js</code> my Google maps lookup doesnt fire (see code below) but the RelationChoice widget works</li> <li>If i only enable <code>collective.js.jqueryui autocomplete</code> my Google maps lookup works but the RelationChoice widget doesnt fire</li> </ul> <p>Code sample:</p> <hr> <pre><code> $(document).ready(function() { initialize(); $(function() { // Google maps lookup $("#address").autocomplete({ //This bit uses the geocoder to fetch address values source: function(request, response) { geocoder.geocode( {'address': request.term}, function(results, status) { ... </code></pre> <hr> <pre><code> ... &lt;input type="text" name="address" id="address" autocomplete="off" class="ac_input"&gt; </code></pre> <p>Is it possible I could re-use <code>plone.formwidget.autocomplete/jquery.autocomplete.min.js</code> in the above code instead? I don't know how to get it to fire my Google maps lookup...? (<code>collective.js.jqueryui autocomplete</code> successfully activates the above function when enabled.)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload