0

I want to implement a field with jquery autocomplete

the code:

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title></title>
  <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.1/themes/smoothness/jquery-ui.css">
  <script src="http://code.jquery.com/jquery-2.1.4.js"></script>
  <script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script>
  <link rel="stylesheet" href="/resources/demos/style.css">
  <script>
  $(function() {
      var codice = [
         "b012198",
  "b989000",
  "l928981",
  "f987651",
  "t567342",
  "b865431",
  "l543215",
  "t100543",
  "b544563",
  "f544321"
    ];
    $( "#enter" ).autocomplete({
      source: codice
    });
  });
  </script>
</head>
<body>

<div class="ui-widget">
  <label for="enter">Codice : </label>
  <input id="enter">
</div>


</body>
</html>

and that works.

I want to callback this in a registration field in joomla 3.4 I called this field 'codice' and it's an element of php array fields of the user-profile.

Which files do I have to change in Joomla? What function should be used?

  • 1
    Unrelated to your question, but you have unnecessary includes in your code above.You are including jquery-ui.js three times and jquery-2.1.4.js twice. – TryHarder Nov 19 '15 at 12:50
0

You can implement a user plugin to receive and process the extra fields.

From Joomla Docs, Creating a profile plugin

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.