This option existed prior to the advent of display modes and hook_field_extra_fields(), which allow you to configure different ways of displaying content under the "Manage display" tab in any content type. My feeling is that the Webform option for "Show complete form in teaser" is inconsistent with the "Drupal way" as it exists in the Fields-in-core world of Drupal 7.

Upgrade-path wise, I think we should default to all forms showing the entire form in the teaser. What do you guys think?

Comments

cwithout’s picture

So that's why I wasn't getting the form in the teaser. I didn't actually want it there, so I didn't look into it, but I did wonder if it might be a bug that the form didn't show even when Webform was in the enabled fields in the Teaser view mode. I even used the "available as block" option right above "show complete form in teaser" and didn't notice that option was there.

So yeah, it isn't really how I expected it to work in D7.

If you take out the option, though, you lose a bit of functionality. Anybody using it to show the form on some teasers and hide on others would lose that ability. Without the ability to hide that field on a node by node basis, some people will be on their own to find a workaround.

Maybe if there were another module to show/hide fields per entity per view mode, people could at least switch to that. I didn't find an existing module.

Formatter Field is close. It could use some UI improvements. (Like limiting the formatters available.) And it doesn't have the option to choose a different formatter per view mode. And though I could see what it was supposed to do, I couldn't get it to work.

I'm not sure if Formatter Field would be a viable alternative if it had some enhancments or if there's another module that I couldn't find that hides fields per entity. I think it would be nice to have an alternative before removing the feature. A module to hide any field per entity per view mode seems like the most elegant solution.

Edit: Oh, and for Formatter Field to be a valid option, either Webform or Formatter Field would have to be modified so Formatter Field can recognize webform as a field.

quicksketch’s picture

Thanks @cristinawithout for your input! Yep this would result in a small loss in functionality. However I don't think many users are needing this option on a form-by-form basis. With the introduction of view modes and the ability to choose this view mode when displaying nodes in Views, Panels, etc, I don't think it would be a terrible loss, as there are usually ways to display/hide the form using different modes. I think the new approach would be cause fewer confusions with the page at "admin/structure/types/manage/webform/display/teaser" saying that the Webform is displayed, but then it's not displayed after all because the display in teaser option is disabled (which it is by default).

cwithout’s picture

Oh. I wasn't suggesting to keep it. I agree it can be taken out.

But so that people who are relying on it and aren't programmers aren't left wondering what they're supposed to do, it would be good to have alternative way to accomplish hiding the node per entity once the feature is removed.

I was thinking in the grand scheme, a module that allowed for hiding fields per entity and per view mode would be an ideal alternative. Formatter Field (which would need changes first) or something similar.

Barring that, another alternative would be a step by step how-to with an example, such as adding a boolean field and a custom formatter that outputs the Webform or not depending on the value of the boolean field.

chronosinteractive’s picture

+1 for this idea.

I just ran into the issue of not having the form showing up in the teaser mode - as I expected from the structure of D7 I spent time trying to debug content type display modes and blocks instead of looking to the webform settings.

With the new display modes the "Show complete form in teaser" check box is entirely counter-intuitive.

quicksketch’s picture

Let's merge in #1783140: Use view modes instead of "full node" and "teaser" options for webform blocks here and make this issue a clearing-house for removing any hard-coded references to the term "teaser".

quicksketch’s picture

Status: Active » Needs review
StatusFileSize
new20.87 KB

This patch is actually really pretty straight-forward. Remove all the options, drop the column, and switch the block configuration to use view modes. There's still a single reference to teaser in hook_node_view(), but we can just check $view_mode in this situation.

quicksketch’s picture

Title: Remove "Show complete form in teaser" option » Remove "Show complete form in teaser" and all "teaser" hard-coded options (use view modes instead)
quicksketch’s picture

Something weird happened with that last patch. This one contains only the relevant changes.

quicksketch’s picture

Title: Remove "Show complete form in teaser" and all "teaser" hard-coded options (use view modes instead) » Remove "Show complete form in teaser" option
Status: Needs review » Fixed

I didn't encounter any problems with these modifications, so I've committed to the 7.x-4.x branch. This will need a change log update in the upgrade guide.

quicksketch’s picture

Title: Remove "Show complete form in teaser" option » Remove "Show complete form in teaser" and all "teaser" hard-coded options (use view modes instead)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.