Difference between revisions of "How to add fields to a product"

From aMember Pro Documentation
Jump to: navigation, search
(Created page with "Create /amember/application/configs/site.php with this code: <source> <?php Am_Di::getInstance()->productTable->customFields()->add(new Am_CustomFieldText('field_name', 'Field...")
 
Line 5: Line 5:
 
Am_Di::getInstance()->productTable->customFields()->add(new Am_CustomFieldText('field_name', 'Field Title'));
 
Am_Di::getInstance()->productTable->customFields()->add(new Am_CustomFieldText('field_name', 'Field Title'));
 
</source>
 
</source>
 +
 +
List of available additional fields types:
 +
* Am_CustomFieldHidden
 +
* Am_CustomFieldText
 +
* Am_CustomFieldSelect
 +
* Am_CustomFieldRadio
 +
* Am_CustomFieldCheckbox

Revision as of 02:04, 29 August 2012

Create /amember/application/configs/site.php with this code:

<?php 
Am_Di::getInstance()->productTable->customFields()->add(new Am_CustomFieldText('field_name', 'Field Title'));

List of available additional fields types:

  • Am_CustomFieldHidden
  • Am_CustomFieldText
  • Am_CustomFieldSelect
  • Am_CustomFieldRadio
  • Am_CustomFieldCheckbox