1

We have a Webform that creates a single membership. We've set it to use the 'existing contact' which very helpfully pre-fills the webform with the existing user's details - or with the details corresponding to the contact's checksum from a CiviMail. This is all brilliant so far!

However, when the page loads it also shows all the contact's existing memberships. And it shows them in the page's system 'messages' block.

In our use case we don't want to see existing memberships. And even if we did we'd want to see them in a webform component that we can control the behaviour of. When they appear in the system messages block it looks like an extra communication to the user and is rather confusing.

So, is it possible to prevent them from loading at all? Or at least have them load as a component of the webform rather than displaying in the messages block?

We are on Drupal 7.58, Civi 5.0.0

1

2 Answers 2

2

You could add a simple css hack to your webform which sets system messages on the front page of the form to display: none. That's not a perfect solution because it will hide all of them, but it's something.

1
  • yes just use css to hide it; we like it/use it; this is the first time I’ve ever heard of anyone trying to hide it Jun 2, 2018 at 4:07
0

There is no way from preventing this message unless you are a developer and write your own drupal module which hides this message.

2
  • I've looked at @jackrabbithanna's comment above and that comes close... is there anywhere else that actually shows the code necessary for this module? No problems if not - just wondering if it's already been done. Thanks!
    – Andyg8
    May 27, 2018 at 14:58
  • You can take a look at the webform_civicrm code at github.com/colemanw/webform_civicrm May 28, 2018 at 7:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.