Jump to content

InputField type Page (API set values)


Manol
 Share

Recommended Posts

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. 

Link to comment
Share on other sites

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
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

  • Recently Browsing   0 members

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