2

For the activity type 'petition signed', I want to add a custom field 'event' next to the standard field 'location', because my organization wants to store information about the specific event where a petition signature was obtained and I want to keep the 'location' field clean (= only geographical location).

I can add a custom field, but on the Activity screen, the fields are now visually separated. I want to keep them together for a better user experience. Is this possible in any way?

this is what I did in a test environment.  Fields are not together on the screen

  • Hi Nele, I am not clear on what your are actually asking? What do you mean by 'clean' and what do you mean by 'visually separated'. What do you wan to see? And for other community members here: what CMS are you using and which version of CiviCRM? – ErikH - CiviCooP Sep 25 '17 at 10:24
  • Hi, we are on CiviCRM 4.6.24., CMS is Drupal. Immagine an event 'ABC' in 'Brussels'. I want to store 'ABC' in a field called 'event' and 'Brussels' in the standard field 'location', so that the 'location' field only contains geographical data like a city/country/... and not the event name. I would like to see the fields on screen next to each other (or one below the other). Can I upload a screenshot to explain? – nelebuyl Sep 25 '17 at 10:46
  • Yes yos you should be able to with the image button. And you can always show me Thursday :-) – ErikH - CiviCooP Sep 25 '17 at 10:48
2

I found easier to move fields on the client side (using jQuery). you could write a simple extension that:

  • adds a custom javascript on the specific page(s) you want to modify
  • and that javascript would move the fields to their new location, and presumably hide the custom group "activity metadata"

It's mostly robust, but you would need to check everytime you do an upgrade that the selectors you used are still the same between different civicrm versions

  • I was hoping that there might be a way to do this without coding, as I have no such skills. – nelebuyl Sep 25 '17 at 12:01
  • It's really hard to make a form you can change easily exactly the way you want, and no matter how many options you can come up with, you will aways have one special need that isn't covered ;( we found easier to make it simple(ish) to inject some javascript, to give the admin full freedom to reshuffle the forms the way they want. As for the javascript code needed for your case, it's probably 5 lines, may be magic @erikH could fix it for you? – Xavier Sep 25 '17 at 12:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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