|
<< Return to Profiles Admin Main Page Table of Contents OverviewPROFILES may be linked to specific modules, used to create standalone forms as well as search and listing pages. Examples of module links include:
Permissions for Profiles (Drupal Only)For Drupal installations, you can use Drupal Access Control to determine which "roles" can access Profile forms and listings (as well as Contribution and Event Registration pages with contain Profiles):
Since many sites use profiles for constituents who may not have user accounts - this configuration is the most common. However, you can restrict general access to profile pages and forms by assigning these permissions to specific roles. If you need to limit access to specific profiles for subsets of your user population - you can do so using by using Access Control Lists (ACLs) (learn more...). If you need to restrict access to a specific profile for anonymous users (for example, a members' only directory) but you still want anonymous users to see other profiles on your site, you can add a function to your Drupal theme to do this. You might be thinking that simple Drupal modules like Path Access could do this but with clean URLs enabled, you can't use a CiviCRM path because of characters like ? and &.
Once you do this, when people try to access the profile, they will get your access denied page but once they login, will be redirected to the profile you wanted them to go to. Not elegant but it worked for us. To visit forum post, click here. If you need to restrict anonymous access to certain forms a safer way to accomplish this would be to implement hook_civicrm_buildForm from within a custom module. This pulls the access control logic out of Drupal's theme layer. To do this, follow step 1 as listed above and then add this code to your custom module: Linking to Built-in Contact Create/Sign-up Form(s)
* Make sure your profile has and includes at least first name and last name OR email address, as these are the minimum required fields for creating a new contact.
Linking to Built-in Contact View and Edit Page(s)
You can also use a Profile to give logged-in users a way to view and/or edit specific fields from their own contact data. As with any profile, you control the fields you want exposed to these view and "self-service edit forms" by the fields you select to include in the profile.
Profile Search and ListingTo allow searching and listing of profiles: Link to <site root>/civicrm/profile?reset=1&gid=N (where N is the Profile ID) to display a Search and Listings page which provides basic search on any "Public and User Listings" Profile fields - and returns a sortable listing of contacts.
You can also create external links to specific Listings filters by creating the url q=civicrm/profile?reset=1&force=1&gid=N&field_name=value.
Be sure to verify the correct field names and values to use in these these URLs by checking the field link from a My Account page, OR by browsing to your profile's listing page without additional filters and doing View Source from your browser. Showing a map is also possible:
Contact Creation or Sign-up Forms using Profile HTML Form SnippetIf you want to place standalone contact create / sign-up form(s) anywhere on a web-site (outside of CiviCRM pages) navigate to Customize » CiviCRM Profile, and then click more and then HTML Form Snippet.
Customized Advanced Search ResultsTo display a different set of columns from the defaults in Advanced Search results:
|
Linking Profiles
Skip to end of metadata
Go to start of metadata
Labels:
