Hot answers tagged

6

Put your css inside {literal}{/literal} tags to prevent smarty from processing them.


5

You can edit /CRM/Utils/API/HTMLInputCoder.php: CRM_Utils_API_HTMLInputCoder->getSkipFields returns a list of fields that will be skipped on encoding. Add an entry for your custom-field to this list prevents the html-input from being escaped. The entry must be "custom_" + custom-field-id.


4

I created a contact custom field with data type "Note" and field type "RichTextEditor" and then ran this API call: CRM.api3('Contact', 'create', { "contact_type": "Individual", "id": 180, "custom_15": "<p><strong>foobar</strong></p>" }); The value was stored as-is, and shows correctly in the UI. This part of ...


4

Looking at the release notes for CiviCRM 4.7.11 there was a security issue that was fixed to do with these external snippets: https://civicrm.org/advisory/civi-sa-2016-17-manage-csrf-overrides-for-external-profile-forms The release notes state, though, that existing installations should not have been affected by the update. I would recommend that you look ...


4

Try: <div style="page-break-before:always;"></div> Works for us, using wkhtmltopdf rather than the default.


3

I figured it out on my own. To print <div> on different pages, it needs to be positioned relative. So, I ended up putting all the existing <div> with position absolute into a <div> with position relative. However, that is not sufficient enough, I also needed to fill in a simple <br /> tag as well. This worked: <div id="page" ...


3

First I'd confirm that the functionality works on another site. You can use a demo site for this, or you can check Google for inurl:civicrm/event/ical OK, so it works for some people! Next check might be to find out if the WordPress path works (inurl:civicrm/?page=CiviCRM&q=civicrm%2Fevent%2Fical perhaps? IDK if Google / other search engines support ...


3

OK - the most obvious changes seem to be that some colours and fonts are removed. You've said you're not a coder, so I understand if this feels "too hard" to debug yourself. I'll share with you what I'd do next, and hope this is some help. In your situation I would compare: The source of the email as saved in the database. (You're looking for the ...


2

Hi Felix and welcome to CiviCRM Stack Exchange. Your problem could have a number of reasons, e.g. the following: your server does not allow access via http for anonymous users (could be protected by htaccess, a vpn...) you do not have a ssl certificate or it is self-signed If that is not the reason please try to provide some more information such as: ...


2

I wouldn't say that it is easy, but it might be possible. You could even look at something like a multi-site setup (https://wiki.civicrm.org/confluence/display/CRMDOC/Multi+Site+Installation) for some ideas. That said, I don't know that CiviCRM can run without a CMS of some sort. Permissions have to be handled somehow. Normally the CMS also handles the ...


2

You mean with your own CMS? you will mostly have to deal with the authentication and permission system. look at what is done in civi for WP, J+, Drupal to give you a sense of the scope. I personally would not invest this time for no obvious value, but I would not either "hand code" my site, so YMMV ;) Good luck!


2

Check this out: https://issues.civicrm.org/jira/browse/CRM-17726 Contents in the body tag get deleted on load. When you resave they get nuked.


2

You can use the body_class filter, query CiviCRM's state and then add suitably named classes: add_filter( 'body_class', 'my_civi_add_body_classes' ); /** * Add classes to body element if on CiviCRM basepage. * * @param array $classes The existing body classes * @return array $classes The modified body classes */ function my_civi_add_body_classes( $...


1

I'm assuming you're using the default mailing Ux, not mosaico The default editor is wysiwyg, if you want to put html tags, click on the view source icon, and paste the html code you want. You can switch back to wysiwyg to see the result. As for the images, be aware that quite a few recipients aren't going to display the image (for privacy reasons), so ...


1

It's in Administer menu » System Settings » Misc, and it's labeled "Accept profile submissions from external sites". That's a little obtuse, but most system warnings have a link on the System Status page, at Administer menu » Administration Console » System Status. See screenshot:


1

You can put basic HTML in the text box you have pictured above. Bold works for email clients. The majority of email clients don't support every type of HTML content you see on the web. Web browsers are able to display scripts, animations, and complex navigation menus, while your typical email inbox isn't built to handle this type of content. Safe to use ...


1

This appears to be unsupported in the API, which encodes all HTML values. I've created a JIRA issue to request this functionality: https://issues.civicrm.org/jira/browse/CRM-21572


1

Have you tried any of the following before submitting the TextArea? Highlight the code portion and Ctrl + K or Command K Indent the code lines 4 spaces Use backtics ' your html ' Use code tag <code>your html</code>


1

Sounds like some javascript got pasted into a rich text editor ("WYSIWYG"), and the result is linebreaks in the JS are being interpreted as content linebreaks and wrapped in <p> container. Simple fix: edit the content containing the JS, and use the "View Source" button or equivalent to enter the JS in source mode rather than content mode. More robust ...


1

I'm guessing this is a 4.6 site based on the second error message? If upgrading isn't possible you could try something like updating the database directly: UPDATE civicrm_setting SET value='i:0;' where name='remote_profile_submissions';


1

I would recommend you create a little jQuery to move the fields around (something like you see here: template jQuery example) And then place the created template with jQuery on the appropriate form (which will probably be CRM_Contact_Form_Edit_Address) using the alterContent hook (something like what you see here: alterContext hook example Although this is ...


1

You're looking at writing a custom WordPress plugin along the lines of the CiviEvent Widget plugin. Basically, you'll query the CiviCRM API to get activities (filtered appropriately to your needs) and then render them as a shortcode and/or widget. So, yes, you can write custom code to do this, even as there is no built-in display for CiviCRM activities.


1

Yes you can paste HTML in but guessing you tried that before asking so perhaps there is something else happening on your site. Here is a link to a field on demo where i just used to prove case.


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