Hot answers tagged

13

There's no way of doing this through the user interface. An alternative approach would be to use a Drupal webform integrated with CiviCRM. You'll need the Webform module, the webform_civicrm integration module, and various dependencies. Depending on the payment processor you are using to process the membership payment, if indeed you are using any, you can ...


12

Ah, I think I've seen this before, did you by chance mess with your CiviCRM settings file? Double-check your CIVICRM_UF setting, Civi might be tripping up if it thinks the CMS is something other than what it actually is. For Drupal 6 you want CIVICRM_UF = 'Drupal6'


10

The current API call requires more than just the key. To enable modules as part of an install profile, you simply need to include this code somewhere in the process when it's possible to initialize CiviCRM... if (!civicrm_initialize()) { drupal_set_message(t('Failed to initialize CiviCRM')); return; } require_once 'CRM/Extension/Manager.php'; ...


10

Generally agree with the previous commenters -- you can do an edit screen using "civicrm/profile/edit", and "webform_civicrm" is generally the next level to go if you want the effect of a standalone profile managed in a Drupal-way. There are hooks for manipulating Civi's profile screens, but they're different from the hooks of typical Drupal forms. For ...


10

The anonymous user does not have permission to view contacts in your database. Be thankful for this default, it can save you from accidentally exposing your entire database to the world! You can override this default by editing the "existing contact" field (from the webform tab) and unticking "Enforce Permissions". Typically you would also set one or more ...


9

no - since standalone html cannot do smart things like populate stuff from db etc not via drupal hook but civicrm also has a hook system similar to drupal. so u can modify stuff via civi hooks. If you think SE is a good place for a Q&A forum, please follow and upvote a few questions at: http://area51.stackexchange.com/proposals/77367/civicrm lobo


8

Can you include 'publish my profile' custom field in your membership page? If option 1 is not possible, the next best bet might be to implement the civicrm postProcess hook on membership form and create the custom field record in the form. Civi only creates custom field records on a as needed basis alternatively you might be able to do the above via use of ...


8

Since a potential attacker got access to the database, and through the evil php module, could execute code, everything on the same server must be considered compromised.


8

You should configure a separate cron entry for CiviCRM on your server. CiviCRM's Managing Scheduled Jobs is the reference documentation here. Best practice is to run your CiviCRM cron separately. Many CiviCRM tasks (eg delivering large email runs) are not suited to Drupal's typical cron schedule. Running CiviCRM cron from Drupal means that an issue with ...


8

So, I think if CiviCRM were installed into Drupal 8 via composer (ie. composer require civicrm/civicrm-core in the Drupal root) and CiviCRM's use of Symfony was compatible with Symfony 2.8 or 3.x (ie. not using deprecated functionality), this could work. This would get everything installed in Drupal's vendor directory, rather than having two, and it'd mean ...


7

1) It's important to clarify what you mean by "standalone profile page". a) If you mean the form presented by CiviCRM at e.g. example.com/civicrm/profile then yes. Construct the url like so: ...civicrm/profile/edit&gid=1&reset=1 where ... represents whatever normally comes before civicrm in your site's url, and in gid=1 replace the number 1 with the ...


7

I probably would guess, yes to this one especially if you have added the civicrm db to the drupal settings file and/or share the civicrm tables in the same drupal db. the primary reason for this is, drupal's db access layer (and code) can access the civi db the same way as the drupal db and hence any exploit in that code can be used against the civi db ...


6

Support for memberships was just added in version 4 of Webform-CiviCRM integration. If you upgrade to that version then membership types will become available.


6

Another approach would be to manipulate the page via JavaScript inserted in the content fields to arrange the fields as required. I admit though it's not very elegant and somewhat hacky.


5

I found a similar question on the webform_civicrm issue queue: https://www.drupal.org/node/2356741 . If this is your question too, then based on the further information you provide there of the MySQL query and error message... "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use ...


5

Might want to ensure that you are using the latest versions of all the above modules. There have been significant improvements in the newer releases Also can the user create non-organization contacts? What is the error message? lobo


5

If you have Drush installed, you can also use the following command to update some of those settings: drush civicrm-update-cfg It will try to update the URL and directory settings, which is pretty equivalent to the URL: "http:///index.php?q=civicrm/admin/setting/updateConfigBackend&reset=1". After that, you can use the API to flush various CiviCRM ...


5

At this time, you cannot currently add custom data to Personal Campaign Pages (see the list at example.org/civicrm/admin/custom/group?action=add&reset=1). If you wanted to do that, your best bet would be to write the code (or pay someone to write the code) that does this, and get this contributed back into CiviCRM.


5

CiviCRM has a table civicrm_uf_match, which links CiviCRM contacts to Drupal (or Wordpress or Joomla) users. Here is its structure: CREATE TABLE `civicrm_uf_match` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'System generated ID.', `domain_id` int(10) unsigned NOT NULL COMMENT 'Which Domain is this match entry for', `uf_id` int(10) ...


5

Webform-CiviCRM will always set the first address as "primary". You don't need to expose the location-type field if you don't want to - you can set it on the backend form. This has the downside of forcing the location type of the primary address to change to whatever you've set the first address to. Here is a solution that will solve your problem for both ...


5

Case and activity settings are a bit tangled up with each other in the current (v4.9) version of the module... BUT, I've just committed several changes to 4.x-dev (soon to be released as v4.10) which: Support multiple activities and multiple cases on a webform Detach the activity and case tabs from each other so you can more cleanly work with one or the ...


5

This works in the 4.5.2 sandbox (unknown if it works in 4.4.6) Set your membership type to rolling instead of fixed Disable the "Grace" membership status If you are having a membership period shorter than 3 months, also disable or shorten the "New" membership status An alternative workaround, which however may be a bit too clunky, would be to create a new ...


5

You can actually do this without Webform-CiviCRM if you like: Set up your campaigns in CiviCampaign Create a new profile to add a field to (or from the Profiles page, click "Fields" beside an existing profile to add a new field there) Add a new "Campaign" field to the profile you are working in (this will list all active campaigns in the profile) Add the ...


5

I don't think this is possible. Drupal 8.4 actually already switched to Symfony 3 although there are still similar discussions related to drush, which has the same problem. see Drush 8.x doesn't install Drupal 8.4.x and Drush master doesn't install Drupal 8.3.x and Symfony components are updated to 3.2.6 It's not possible to load two different symfony ...


5

there is no hook called hook_buildForm in drupal, acctually the hook you are trying to implement is hook_civicrm_buildForm, so to get it work you should use mymodule_civicrm_buildForm, you always can use hook_form_alter or more specifically hook_form_FORM_ID_alter to make change on any form in drupal


4

Create a CiviCRM Profile (or reuse one of the existing ones) by going to Administer >> Customize Data and Screens >> Profiles and set it to be enabled on "View/Edit Drupal User Account". Then the user will be able to edit their details from their Drupal user page. See this Demo Profile on CiviCRM Demo site and notice that "View/Edit Drupal User Account" is ...


4

I would use the CiviCRM views integration to create views of the events, and ensure that these are searchable by using the Search by Page module which according to the project page "allows you to index non-Node pages, including user profiles, file attachments, and Views".


4

You can do this with a custom module and using the preprocess views hook to pass in the contextual filter. The filters are passed into the $args[] variable. You also may need to enable multiple values in a contextual filter, if you have more than one relationship from Contact A to Contact B, in this case this is multiple employers. This is under Contextual ...


4

We use Drupal Webform-CiviCRM to create cases, but ofcourse not for the steps you are asking about :-) I would reckon passing in the activityID should be enough, have a play and let me know!


4

One way to do it would be to pore through the CRM/Upgrade/ directory in the new version, looking for schema changes. However these are distributed across multiple files, depending on which alpha or beta version the change was introduced in. E.g. the next_sched_contribution_date change was introduced in this file: civicrm/CRM/Upgrade/Incremental/sql/4.4....


Only top voted, non community-wiki answers of a minimum length are eligible