A block with 2 views -- on the page VS. in a modal -- possible?

Permalink
I created an Advanced Form, then added it as a block to my page for adding content. Additionally, I hard-coded some extra DIVs into the block's view.php to prep the form for a jQuery sliding panel with a tab at the bottom for toggling visibility. This works beautifully on the page.

The modal view, however, is now useless. The form remains hidden and the tab is unstyled and non-functioning. How, oh how could I ONLY add the extra html to the view.php when I am directly on the page and NOT in a modal window? How does one make that distinction in the code?

p.s. I figure this is not necessarily an Add VS. Edit issues, because you can also add content through a modal in the Dashboard...

I appreciate your time. Have a great day!

James

 
jordanlev replied on at Permalink Reply
jordanlev
When you say "Advanced Form", do you mean the Advanced Forms addon in the marketplace? That's a paid addon so you might try putting in a support request there with the developer. (I don't know how the code works on that one because I've never purchased it myself, so unfortunately I can't offer any help).
pkunzipula replied on at Permalink Reply
Jordanlev,

I have directed other Advanced Form-specific questions at the developer, but I supposed that this was more of a generic "how do you determine whether you're viewing a block in a page or in modal" type scenario.

I am learning PHP, so my assessment of the complexity of this could be way off.

By the way, your Designer Content block looks awesome. I've got it, and can't wait to try it out. So thank you.

James
jordanlev replied on at Permalink Reply
jordanlev
I see.
Well the problem with this specific situation is that "modal view" is not a normal C5 block thing -- it's very special to that advanced forms block.
(Unless I'm not understanding you correctly -- you're not talking about the "add/edit" dialog, but rather a function that lets end-users work with forms, correct?).

Thanks for the kind words about Designer Content. It was born out of a need I kept having. I've been using it on projects for the past several weeks and it has helped me immensely (both saving development time and giving my clients an easier way to edit content and ensure that it goes into the design properly).

-Jordan
pkunzipula replied on at Permalink Reply
Jordan,

From what I don't know about nuthin', I'd say your assessment is correct...it's not an Add/Edit thing...it's specific to the block's behaviour <-- ooh! British misspelling!

So...I suppose I'll target the developer for a solution to this quandary.

Are you gonna be around for questions regarding Designer Content? It doesn't look difficult, but I tend to work myself into unforeseen corners.

Thanks again for your help.

James
jordanlev replied on at Permalink Best Answer Reply
jordanlev
Yes, I will be around for assistance with Designer Content (best way to do it is post to that addon's forum in the marketplace -- I get an email notification whenever those happen).

And even though I'm not British, I always spell it "behaviour" (which my spellchecker doesn't like, but it will just have to deal)