Customize DayBack’s Appearance for Each User

By modifying just one FileMaker script, you can add CSS specific to certain users or privilege sets. Use this to…

  • Swap out or remove buttons
  • Show or hide different calendar views
  • Show or hide individual fields in an event
  • Add icons for certain event statuses
  • Show or hide help icons
  • Code examples for all of these, and more, are here.

Edit the script “Export Theme ({Preview})” and in the Else branch, replace the single ExportFieldContents line with lines 22 through 31 in the screenshot below. You’ll see just a single branch here for the user “Bob”, but change that to “=” and you can create a separate branch for each user who needs special CSS. (Click on the image for a larger version.)

Custom CSS for each DayBack User

Line 25, which you can’t really read in the screenshot, is where you actually add new CSS. Here is the second part of the SetField dialog and the example here just turns off the green plus button:

// Hide the plus button for new events
".add-event-container {
display: none !important;
}"
& ¶ &
// Hide the "new event" popover button
"div[content=newEvent]{
display: none !important;
}"
& ¶ &
CalendarInterface::ExportGlob

Don’t forget to include the regular CSS at the end, in the last two lines which reference the CalendarInterface::ExportGlob. You’ll find examples of some common CSS changes here: customizing DayBack’s CSS.

Note that the script above only runs at startup, so if you are having users log in and out of your solution after startup, you’ll want to run DayBack’s “Upon Opening” script after each login change.

Enjoy!

Featured Posts

Follow Along

Stay up to date with the latest news & examples from SeedCode

Leave a Reply

Your email address will not be published. Required fields are marked *

Check out some of our other posts ...

DayBack Calendar in Claris Pro

DayBack for FileMaker 19 works great in Claris Pro with no changes required. The older DayBack Classic also works in Claris Pro, but requires a few changes.

New in DayBack: Unscheduled Items

DayBack can now render a list of items needing to be scheduled. Users can drag items from this list into the calendar when they’ve found

Comments in FileMaker Calendar

Highlight Notes and Comments in Your Calendar

Inline Notes in DayBack Calendar The latest DayBack extension adds an icon to your events when there is a comment present that matches your criteria. You can

COMPANY

FOLLOW ALONG

Stay up to date with the latest news & examples from SeedCode

© 2023 SeedCode, Inc.