The file, personalize_form.cpt, which is used for the management of a user's
profile contains the following code blocks:

 <fieldset tal:define="macros here/additional_memberdata/macros | nothing;
                       top_macro macros/top | nothing;
                       showTop python:top_macro;
                       bottom_macro macros/bottom | nothing;
                       showBottom python:bottom_macro;
                       after_primary macros/after_primary| nothing;
                       showAfterPrimary python:after_primary;">

And:

 <tal:macro condition="showTop">
     <div metal:use-macro="top_macro"/>
 </tal:macro>

If a macro by the name of "top" exists in the global namespace, this will get included
prior to the display of the standard Plone personalize_form.pt.  This is an easy way to 
"tack on" several new fields for profile management before (and after -- see "macros/bottom")
Plone's standard options.

If you configured the Salesforce Auth Plugin to treat the Contact object as a user within
your portal and configured the property mapping (remember, it's plone form field name 
"pipe" Salesforce field name) of the Salesforce Auth Plugin with the following:

 department|Department
 salutation|Salutation
 favorite_fruit|Favorite_Fruit__c
 favorite_boolean|Favorite_Boolean__c
 birthdate|Birthdate
 department|Department
 

You could then add the following code snippet to your skin and the above fields (however 
meaningless they might be) would show up as the new first fields for the user to modify 
upon profile management:

<html xmlns="http://www.w3.org/1999/xhtml"
       xml:lang="en-US" lang="en-US"
       xmlns:tal="http://xml.zope.org/namespaces/tal"
       xmlns:metal="http://xml.zope.org/namespaces/metal"
       xmlns:i18n="http://xml.zope.org/namespaces/i18n"
       i18n:domain="plone">

     <body>
         <metal:tag define-macro="top">
 
             <div class="field"
                  tal:define="error errors/salutation | nothing;
                              salutation python:request.get('salutation', member.getProperty('salutation', ''));"
                  tal:attributes="class python:test(error, 'field error', 'field')">
 
                 <label for="salutation" i18n:translate="label_salutation">salutation</label>
 
                 <div class="formHelp" i18n:translate="help_salutation">
                 Your salutation in a company setting.
                 </div>
 
                 <div tal:content="error">Validation error output</div>

                 <select>
                    <option value="Mr.">Mr.</option>
                    <option value="Ms.">Ms.</option>
                 </select>
                 Member value: <span tal:replace="python:member.getProperty('salutation', '')" />
             </div>

             <div class="field"
                  tal:define="error errors/favorite_fruit | nothing;
                              favorite_fruit python:request.get('favorite_fruit', member.getProperty('favorite_fruit', ''));"
                  tal:attributes="class python:test(error, 'field error', 'field')">
 
                 <label for="favorite_fruit" i18n:translate="label_favorite_fruit">favorite_fruit</label>
 
                 <div class="formHelp" i18n:translate="help_favorite_fruit">
                 Your favorite_fruit in a company setting.
                 </div>
 
                 <div tal:content="error">Validation error output</div>

                 <select multiple>
                    <option value="Apple">Apple</option>
                    <option value="Orange">Orange</option>
                    <option value="Pear">Pear</option>
                 </select>
                 Member value: <span tal:replace="python:member.getProperty('favorite_fruit', '')" />
             </div>

             <div class="field"
                  tal:define="error errors/favorite_boolean | nothing;
                              favorite_boolean python:request.get('favorite_boolean', member.getProperty('favorite_boolean', ''));"
                  tal:attributes="class python:test(error, 'field error', 'field')">
 
                 <label for="birthdate" i18n:translate="label_favorite_boolean">favorite_boolean</label>
 
                 <div class="formHelp" i18n:translate="help_favorite_boolean">
                 Your favorite_boolean in a company setting.
                 </div>
 
                 <div tal:content="error">Validation error output</div>

                 <input type="checkbox"
                        id="favorite_boolean"
                        name="favorite_boolean"
                        value="member.favorite_boolean html_quote"
                        tal:attributes="value favorite_boolean"
                        />
                 Member value: <span tal:replace="python:member.getProperty('favorite_boolean', '')" />

             </div>

             <div class="field"
                  tal:define="error errors/birthdate | nothing;
                              birthdate python:request.get('birthdate', member.getProperty('birthdate', ''));"
                  tal:attributes="class python:test(error, 'field error', 'field')">
 
                 <label for="birthdate" i18n:translate="label_birthdate">birthdate</label>
 
                 <div class="formHelp" i18n:translate="help_birthdate">
                 Your birthdate in a company setting.
                 </div>
 
                 <div tal:content="error">Validation error output</div>

                 <input type="text"
                        id="birthdate"
                        name="birthdate:date"
                        size="25"
                        value="member.birthdate html_quote"
                        tal:attributes="value birthdate"
                        />
                 Member value: <span tal:replace="python:member.getProperty('birthdate', '')" />

             </div>

             <div class="field"
                  tal:define="error errors/department | nothing;
                              department python:request.get('department', member.getProperty('department', ''));"
                  tal:attributes="class python:test(error, 'field error', 'field')">
 
                 <label for="department" i18n:translate="label_department">department</label>
 
                 <div class="formHelp" i18n:translate="help_department">
                 Your department in a company setting.
                 </div>
 
                 <div tal:content="error">Validation error output</div>

                 <input type="text"
                        id="department"
                        name="department"
                        size="25"
                        value="member.department html_quote"
                        tal:attributes="value department"
                        />

                 Member value: <span tal:replace="python:member.getProperty('department', '')" />

             </div>

         </metal:tag>

     </body>
 </html>


In addition to the above fields mapping as described above, you could also choose to manage
any and all of Plone's standard user property fields (as seen in portal_memberdata) against
existing and/or custom fields on your preferred user object within Salesforce.com.  This would 
require no additional modification to personalize.cpt, with the caveat that the profile image may not
easily work without some doing.

The same approach as described above could easily be added to join_form.cpt, though the preconfigured
hooks looking for macros titled "top" and "bottom" don't appear at this time.


