Jump to content

Using InputfieldPageAutocomplete Module in frontend


Recommended Posts

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.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...