Jump to content

Recommended Posts

Posted

Hello Guys.

I have a page with an inputField of type Page and I would like to populate it with other pages id's via API.

What is the best way ( SelectMultiple, AsmSelect, PageListSelect , PageListSelectMultiple ) , and how can I populate from the API?

I've been searching but couldn't find the right response, any ideas will be welcome.

Thank you. 

Posted

Unless I'm somehow missing your point here, inputfield doesn't matter when working over API. Insert values and save the page, that's it:

$page->of(false);
$page->page_field = $pages->get('name=my-page');
$page->page_field = 1; // etc.
$page->save();

For more examples take a look at this post.

  • Like 3

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...