I'm confused on how to use the $inline variable (parameter) that is natively available in the "Before record Updated" and After record updated" events in PHPR 5.3 (7474).
I thought I could use this var to distinguish between an "inline" edit vs a "regular" edit.
Simplified example of what I was hoping to achieve:
- Say you have an edit form with 10 fields.
- I want to add only the first 5 fields to the inline edit functionality (so I can edit on list page only those first 5 fields... let's call them A thru E)
- I want to add the last 5 fields (let's call them F thru J) to the regular edit popup page.
- I would like to have different behaviors when saving the edit form (in the before record update event) based on whether the edit form is being saved while in inline edit mode vs. when it is being saved from the popup mode.
I tried examples shown in the forums (there aren't many) and read the documentation... however, the $inline variable basically seems to only acknowledge that, "yes" you are editing the form. Well, that seems worthless to me since I already know that by virtue of using code in the before record updated event (which already tells me that I am editing the form!). Am I missing something here? I tried using that variable in various ways such as...
if($inline){
$values["field1"] = 1;
}
//Also tried
if(!$inline){
$values["field1"] = 1;
}
The behavior of either of the two snippets I show do in fact act differently, but it doesn't seem to distinguish whether I'm saving from inline or popup form!
Anyone have any suggestions or alternatives to using this variable/parameter?
Thanks,