Render Select attribute form
I'm trying to render a select attribute form (like you see in a page's properties if you have a select page attribute) which shows all the available values for a particular attribute. I don't want to process them with the API (i'm doing that with a custom function) - I just want to display them.
I've gone through the docs and searched and searched to no avail.
$object // an instance of a CollectionAttributeKey
$aValues are your default values
echo $object->render('form', $aValues, true);
edit: actually the script is called when text is entered (I can see this in Firebug's Net panel), but nothing shows up as a suggestion. The script response is correct as well, but the values aren't then passed into the input field.
$page = Page::getCurrentPage(); //or populate it from your tool request call on any page $aValues = $page->getAttributeValueObject($object);
sorry, try that.
The reason for using attributes is I need to apply them to some pages, but i'm storing the same information for non-pages (map entries) so I want the text to be identical, hence using the attribute helper to select them.
EDIT: I've got the list using the code from this post (http://www.concrete5.org/community/forums/customizing_c5/get-list-of-custom-page-attribute-values-select-list/) but rendering the AJAX interface is proving elusive..
$at_key = $at_cat->getAttributeKeyByHandle('your_at_key_handle');
$at_key_id = $at_key->getAttributeKeyID();
$at_key->outputSearchHTML(); //similar to render