calendar vis - override event detail view with calculated content

Subject line pretty much sums it up. I do have the display details option enabled so there's no intermediate popover.

I'd like to display some php content calculated from other values in the record instead of the default detail view.

(background:

each day in the calendar will have 5 events (breakfast,lunch,dinner,snack, entire).

this calendar will serve as the front-end to a donation page which will receive the date and the event title which will be passed to the donation form

)

I also noticed the calendar is not initializing it's display to "Today" but instead is one month ahead.
 
So after digging around a while..

I've solved the custom content on the popover by disabling the popover entirely and going right to the detail view and then creating a custom template for the detail view. So far so good.

I tried putting a Fabrik_Calc field as the label element (which I think would have solved my problem -- i could test other form elements and then output the right html for the field ) but the calc element doesn't seem to have been calculated yet. Do I need to dig into the calendar.js to do this?

I also need to dynamically change the CSS for the calendar label element based on a value in the form. Haven't quite figured that one out either .
 
Whether the calc element has a value kind of depends when you created it, and what the "Only calc on save" is set to.

The default for calc elements is to "only calc on save" which means we only do the calculation when the form is submitted, when the value is written to the table. So if you add a calc to a list/form which already has data in it, existing rows won't have a value, until you edit and save each row at least once. We don't go and do the calculation for all the existing rows when you create / change a calc element.

If the "only calc on save" is set to No, then we also run the calc when we render that element, in a list or for view. Although that rendering doesn't get saved to the table - we still only save the calculated value when you submit a form.

So ... check your underlying table data, using something like phpMyAdmin and see if the field for the calc actually has values in it. If it doesn't, then that's the issue.

NOTE - I'm not 100% sure if just setting "only calc on save" to No will fix your issue in the viz, as I can't recall if, when we load the data for the viz's view, we run the rendering or not. I know we do in list and form views just not sure about cal viz views.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top