Re: 新規ユーザー登録のオプションを属性セット毎に出力したい

2015年3月12日 at 12:53

$category = AttributeKeyCategory::getByHandle('user');
if (is_object($category) && $category->allowAttributeSets()) {
$sets = $category->getAttributeSets();
foreach($sets as $as) {
?>
<h3><? echo $as->getAttributeSetDisplayName()?></h3>
<?php
$attribs = $as->getAttributeKeys();
if (count($attribs) > 0) {
$af = Loader::helper('form/attribute');
foreach($attribs as $ak) {
echo $af->display($ak, $ak->isAttributeKeyRequiredOnRegister());
}
}
}
}

Re: 新規ユーザー登録のオプションを属性セット毎に出力したい

2015年3月12日 at 13:21
ありがとうございます!

セット名のハンドルなどで指定したセットを出すことは可能でしょうか?
 

Re: 新規ユーザー登録のオプションを属性セット毎に出力したい

2015年3月12日 at 13:27
AttributeSet::getByHandle があるよ

http://www.concrete5.org/api-legacy/Concrete5_Model_AttributeSet.html