Pros and Cons of the SmartForms Content Control

I have a form with some views that I’ve surfaced in a tabbed interface through the use of a content control. The content control makes tasks like these super easy, but it comes at a price.

The content control makes quick and easy work of displaying a form within another form or view, making it ideal for displaying content within tabbed interfaces.

But because the control works by pointing to a URL, there’s actually no relationship between the form or view the control is on and the content you’re displaying.

An example: say you have a rule on the host form (the one with the content control) that says if the tab is clicked, configure the content control to point to the URL of your content form. (Check out my ultra-cheesy Paint image below).

content-control

Now let’s say you want to modify that rule to tell it to call the Initialize() method of the content form (CF) or it’s views (CV). You can’t — because CF isn’t actually associated in any way with the host form (HF). That content control could be pointing to CNN.com — HF doesn’t care where the thing is pointed. HF can’t listen for events in CF, and you can’t drive actions in CF from HF.

So if you’re using a content control, keep in mind its contract with your content is to display it. Nothing more. If you’re going to want the host form to have access to the content form or its elements, the content control might not be the way to go.

the_more_you_know_banner

Pros and Cons of the SmartForms Content Control

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s