How do I add custom fields to Personal Campaign Pages
This diff is against 4.5.0  .  It doesn't display the custom field values on the PCP view page, but it adds the capability to create custom field groups on PCP entities, and save values on add/edit pages. 

diff -r original/civicrm/CRM/Core/BAO/CustomGroup.php new/civicrm/CRM/Core/BAO/CustomGroup.php
1102a1103,1104
&gt;       case 'Pcp':
&gt;         $tableName = 'civicrm_pcp';
1168a1171
&gt;       case 'Pcp':
1521a1525
&gt; 
1698a1703,1704
&gt;       case 'Pcp':
&gt;         return 'civicrm_pcp';
1721a1728
&gt;   
diff -r original/civicrm/CRM/Core/SelectValues.php new/civicrm/CRM/Core/SelectValues.php
179a180
&gt;       'Pcp' =&gt; ts('Personal Campaign Pages'),
diff -r original/civicrm/CRM/Custom/Form/CustomData.php new/civicrm/CRM/Custom/Form/CustomData.php
54c54
&lt;   ) {
---
&gt;   ) { 
145c145
&lt;     }
---
&gt;     }   
diff -r original/civicrm/CRM/PCP/BAO/PCP.php new/civicrm/CRM/PCP/BAO/PCP.php
85c85,92
&lt; 
---
&gt;     //start custom field code addition
&gt;     //store custom data
&gt;     if (!empty($params['custom']) &amp;&amp;
&gt;       is_array($params['custom'])
&gt;     ) {
&gt;       CRM_Core_BAO_CustomValueTable::store($params['custom'], 'civicrm_pcp', $dao-&gt;id);
&gt;     }
&gt;     //end custom field code addition
diff -r original/civicrm/CRM/PCP/Form/Campaign.php new/civicrm/CRM/PCP/Form/Campaign.php
63a64,87
&gt;     
&gt;     //start custom field code additions
&gt;     //check for custom data type.
&gt;     $this-&gt;_cdType = 'Pcp';
&gt;     $this-&gt;assign('cdType', FALSE);
&gt;     if ($this-&gt;_cdType) {
&gt;       $this-&gt;assign('cdType', TRUE);
&gt;       $this-&gt;set('type', 'Pcp');
&gt;       $this-&gt;set('entityID', $this-&gt;_pageId);
&gt;       $this-&gt;set('cgcount', 1);
&gt;       CRM_Custom_Form_CustomData::preProcess($this);
&gt;     }
&gt;     //end custom field code additions
&gt;     
&gt;         // when custom data is included in form.
&gt;     if (!empty($_POST['hidden_custom'])) {
&gt;       $this-&gt;set('type', 'Pcp');
&gt;       $this-&gt;set('entityID', $this-&gt;_pageId);
&gt;       $this-&gt;set('cgcount', 1);
&gt;       CRM_Custom_Form_CustomData::preProcess($this);
&gt;       CRM_Custom_Form_CustomData::buildQuickForm($this);
&gt;       CRM_Custom_Form_CustomData::setDefaultValues($this);
&gt;     }
&gt; 
70c94,99
&lt; 
---
&gt;     //load only custom data defaults.
&gt;     
&gt;     if ($this-&gt;_cdType) {
&gt;      $defaults = CRM_Custom_Form_CustomData::setDefaultValues($this);
&gt;     }
&gt;     
93c122
&lt; 
---
&gt;  
103a133,140
&gt;     $this-&gt;assign('customDataType', 'Pcp');
&gt;     $this-&gt;assign('entityID', $this-&gt;_pageId);
&gt;    
&gt;     if ($this-&gt;_cdType) {
&gt;       CRM_Custom_Form_CustomData::buildQuickForm($this);
&gt;     }
&gt;     //lets assign custom data type and subtype.
&gt;     
229c266,274
&lt; 
---
&gt;     
&gt;        //process custom data.
&gt;     $customFields = CRM_Core_BAO_CustomField::getFields('Pcp', FALSE, FALSE);
&gt;     $params['custom'] = CRM_Core_BAO_CustomField::postProcess($params,
&gt;       $customFields,
&gt;       $this-&gt;_pageId,
&gt;       'Pcp'
&gt;     );
&gt;    
232d276
&lt; 
Only in new/civicrm: groupcountsearch.txt
diff -r original/civicrm/templates/CRM/PCP/Form/Campaign.tpl new/civicrm/templates/CRM/PCP/Form/Campaign.tpl
97a98,120
&gt; 
&gt; {* load the custom data *}
&gt; {if $cdType}
&gt;     {include file="CRM/Custom/Form/CustomData.tpl"}
&gt; {else}
&gt; 
&gt; {* include custom data js *}
&gt; {include file="CRM/common/customData.tpl"}
&gt; 
&gt; {literal}
&gt; &lt;script type="text/javascript"&gt;
&gt;   CRM.$(function($) {
&gt;     {/literal}{if $customDataSubType}
&gt;       CRM.buildCustomData( '{$customDataType}', {$customDataSubType} );
&gt;     {else}
&gt;       CRM.buildCustomData( '{$customDataType}' );
&gt;     {/if}
&gt;     {literal}
&gt;   });
&gt; &lt;/script&gt;
&gt; {/literal}
&gt;   
&gt; {/if} {* load custom data *} 
99a123
&gt;