sakkoulas Posted May 25, 2015 Share Posted May 25, 2015 Hello, how can i set autocomplete field value from api. i have try with $page = wire('pages')->get(1); $page->of(false); $page->autocompleteField = 7111; $page->save(); $page->of(true); but doesn't work. thank you. Link to comment Share on other sites More sharing options...
adrian Posted May 25, 2015 Share Posted May 25, 2015 Because an autocomplete inputfield is connected to a page field, you are dealing with an array, so try this: $page->autocompleteField->add(7111); Link to comment Share on other sites More sharing options...
sakkoulas Posted May 29, 2015 Author Share Posted May 29, 2015 hello adrian thank you for your response but it doesnt work ..... let me explain, in frondend i can set and save the field, I have a module that runs in backend and it neads to save that field from a form. i have try everything i found in the forum but nothing worked. thank you ..... Link to comment Share on other sites More sharing options...
adrian Posted May 29, 2015 Share Posted May 29, 2015 Can you provide the code for the entire module for us to see? Do you have debug mode on? Any errors? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now