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 ...

Suggesting Appointment Slots

Show Available Slots that Match Multiple Criteria Schedulers often look for gaps in their schedules to find the open resources for each opportunity. But sometimes,

Introducing Draft Settings Mode

Following up on this idea that people stretch themselves when they feel a little safer, we’ve been very focused on the customization experience for DayBack

New Longer Timescales for DayBack

Resource Scheduling Swimlanes You can now extend the pivoted scheduling view in DayBack to show items by week instead of solely by day. This lets

FileMaker Summer Camp – Recap

Unconference Sessions If you missed Pause in October, here’s a look at the sessions that attendees hosted. All the sessions are listed in this post

COMPANY

FOLLOW ALONG

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

© 2024 SeedCode, Inc.