This patch adds a setting on the general fieldset to enable inline form errors on any form id without people to know the form_id or having to enter new forms from new enabled modules on the settings screen - which can be a highly time consuming task - and something you can forget easily too.

Simple use cases: new campaign monitor lists which have been synced, new modules enabled on a site, new enabled content types and/or fields, webform nodes ....

Comments

stijndm’s picture

Thanks for this patch. I had my own ideas on how to implement a site-wide enable, but I'll definitely have a look at this patch.

- I think there should be a distinction between frontend and backend, maybe integrate with admin_theme somehow
- Individual settings should remain in tact, but I think this patch covers that

Anyway, I hadn't considered a sitewide enable yet, just a front end enable. With the settings from admin_theme I could then check what else would be considered frontend/backend.

stijndm’s picture

Additionaly an option should be provided to 'ignore' the sitewide setting on individual forms allowing to disable IFE on certain forms if desired.

swentel’s picture

StatusFileSize
new2.73 KB

Hmm #2 is valid true - updated the patch - tiny error in $display check.

swentel’s picture

Apart from a global setting, there is a racing condition problem too. It's sometimes dangerous to let IFE take over the theming of a form element when the form itself also has a theming function. Menu table dragging stops working because the parent element is rendered too soon - in fact, most forms with table drag did. Haven't tested it on others, but it's likely to happen now and then. Not sure what the best approach is, but it's good to know this problem for future bug reports :)

stijndm’s picture

I know, it's for the same reasen filefield/imagefield don't work.

I'm looking in to different approaches, but nothing definite yet.

stijndm’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
firebus’s picture

It would also be nice to allow ife for all forms provided by a specific module (webform for example) or to allow a wildcard in form_if (webform_client_form_* for example)

should that be a separate feature request/patch?

firebus’s picture

Status: Needs review » Needs work

The patch in #3 did not apply cleanly for me (patch complained of a malformed patch in the ife.module section) but once I manually applied the changes, it worked great. Thank you!

firebus’s picture

this patch breaks tabledrag.js on admin/build/menu-customize/menu-name. probably also on admin/build/block

this makes it impossible to sort menu items with ife enabled.

it would be probably be good to add a form id blacklist so that core drupal functionality isn't broken

firebus’s picture

Version: 6.x-2.x-dev » 6.x-1.x-dev
Status: Needs work » Needs review
StatusFileSize
new3.58 KB

Here is a patch against 6.x-1.x-dev that adds a black list of core drupal forms that are incompatible with ife because of tabledrag.

stijndm’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev

Moving this to D7 branch

stijndm’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
marcusx’s picture

Issue summary: View changes
StatusFileSize
new2.72 KB

Here is a slightly refurbished version of #10 against the latest 7.x-dev.

A separate checkbox for adding ife to all webforms could improve this even more. My main reason for patching ife that it is to complicated for editors who create webforms to get the form id and add the id to the configuration for each webform.

But maybe it is ok to use ife anywhere. It will test this now with the global setting and report back if things break as I am using a lot of inline forms and stuff on the site I am using this and I wouldn't be suprised if the blacklist isn't enough.

BarisW’s picture

Status: Needs review » Reviewed & tested by the community

Patch works good. Thanks! Can this be committed?

ram4nd’s picture

Status: Reviewed & tested by the community » Needs work

Needs a re-roll. Does not apply to dev.

michel.settembrino’s picture

Status: Needs work » Needs review
StatusFileSize
new2.43 KB

Patch re-rolled for current dev version.

scuba_fly’s picture

+1 #16 works for me.

ram4nd’s picture

Re-roll does not work for me. The branch in the issue is 7.x-2.x.

dani3lr0se’s picture

Status: Needs review » Needs work

#16 does not work me either. I tried applying the patch to the current dev version with no luck.

patching file ife.settings.inc
Hunk #2 FAILED at 154.
1 out of 2 hunks FAILED -- saving rejects to file ife.settings.inc.rej
paulvandenburg’s picture

Status: Needs work » Needs review
StatusFileSize
new1.88 KB

Rerolled the patch.

ram4nd’s picture

Status: Needs review » Needs work

Looks like you missed a line.

paulvandenburg’s picture

Status: Needs work » Needs review

No the vset part is removed and no longer relevant.

  • ram4nd committed 6856f04 on 7.x-2.x authored by paulvandenburg
    Issue #750594 by swentel, firebus, paulvandenburg, michel.settembrino,...
ram4nd’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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