Hello.
I need to create a page select type of field in a frontend Form
The form is created using API:
$formJob = $modules->get("InputfieldForm");
$formJob->method = "post";
...
And each field is created and added to the main form Object using corresponding Inputfield(X) module
$field = $modules->get("InputfieldText");
$field->placeholder='NAME';
$field->attr('id+name','name');
$field->required = 1;
$field->maxlength = 150;
$formJob->append($field);
The question is:
How can I use the PageAutocomplete module in my form?
I have tried adding a field as in the previous example:
$field = $this->modules->get("InputfieldPageAutocomplete");
And setting the corresponding variables.
Even included some JS files from Core: wire/modules/JqueryCore/jqueryCore.js ,wire/modules/JqueryUI/JqueryUI.js and the module JS file itself.
But nothing happens, no ajax call, no jquery UI initialization, nothing.
It is possible to use this inputfield outside the admin area/backend?
Any help is appreciated.