as tedbow's comment @ Hide Entityform Type title(label) when it is attached to node and ER current is set , this can be achieved from EntityReference module.
Why is this specific to entityform?
because entityform is structurally different than normal nodes , Automatic Nodetitles , Automatic Entity Label and Title modules won't make form label hidden.
I came with simple code to achieve this, please make this code into patch.This was generated using winmerge on windows.
references:
https://drupal.org/comment/6783874#comment-6783874
http://stackoverflow.com/questions/517257/how-do-i-apply-a-diff-patch-on...
Comments
Comment #2
nithinkolekar CreditAttribution: nithinkolekar commentedsorry wrong patch was attached.
Comment #3
nithinkolekar CreditAttribution: nithinkolekar commentedComment #4
nithinkolekar CreditAttribution: nithinkolekar commentedComment #5
tedbow@nithinkolekar, I like the idea. I also think it could be useful for other modules Entity Registration.
I think there are whitespace issues with this patch.
You may try running your code through the Coder module first.
Comment #6
tedbowAlso you have to set the status back to "Needs Work" for the automatic testing to be triggered.
Comment #8
tedbow@nithinkolekar
The patch failed because of
This a common error on windows. You have to set up whichever text editor or IDE your are using to unix-style endings. It also helps if you set it up with other Drupal coding standards. A lot of the popular ones have extensions or add-ons that format files correctly for Drupal standards.
Comment #9
nithinkolekar CreditAttribution: nithinkolekar commented#5 done,#6 done and for #8 - patch generated on unix system
Comment #10
nithinkolekar CreditAttribution: nithinkolekar commentedComment #12
tedbowLooks like you are still getting the error
Maybe leftover from when you were editing files on Windows?
Also I am not sure if you have to but if I am running Coder I usually switch the setting to "minor (most)" from normal. It will alter you of the most problems.
Comment #13
nithinkolekar CreditAttribution: nithinkolekar commentedThis time it should work, tested with scite editor which is showing unix line encodings ie LF. Coder doesn't seem to be testing unix-line encodings.
Comment #15
nithinkolekar CreditAttribution: nithinkolekar commentedI quit, can't fight with system :(.
Comment #16
tedbow@nithinkolekar this time it was actually a different error
See https://qa.drupal.org/pifr/test/767018
This means that our patch didn't apply to the correctly to the repo. Which version of the module were you working against? You should usually be writting patches against the dev version or in this case branch 7.x-1.x. But the issue was set to 7.x-1.1. I will change the issue and retest to see if it fixes it.
Comment #17
tedbow13: entityreference-hide-entityform-title-update2.patch queued for re-testing.
Comment #19
nithinkolekar CreditAttribution: nithinkolekar commentedPatch was written to 7.x-1.1 (timestamp 1384973110).
On visiting test result page I got this
I don't get why it is searching in that directory. As you can see in patch, it was created using diff on entityreference-ori.module entityreference-patched.module files.
All other other patches on D.O are having diff on directory like a/original_file and b/modified_file. Is this causing the problem or filename entityreference-patched.module is the problem.
Comment #20
odisei CreditAttribution: odisei commentedIs there any progress on this issue?
Thanks
Comment #21
Nicolas Bouteille CreditAttribution: Nicolas Bouteille commentedHi there,
I just applied the patch manually, it works perfect. Does the job and no errors at all for now.
I noticed a few things that could explain why the patch won't pass.
It looks like indentation is not good on this line
+ $element['hide_title'] = array(
and also for this block of code
but more importantly, I believe Drupal's best practice states that conditional statements should always have braquets '{}' even if one-line-only.
I have never created a patch yet so maybe this won't solve it but I would personally try that.
Good luck! Hope this gets committed in next version but just in case I'm gonna apply a display: none as a backup plan...
Comment #22
jgullstr CreditAttribution: jgullstr commentedRe-roll for dev.
Comment #23
jgullstr CreditAttribution: jgullstr commentedRTBC. The rationale behind the patch is straight-forward: Add a flag that controls the value of the $page parameter when calling entity_view.
An addition that could be useful, is to show the setting iff the current entity controller implements EntityAPIControllerInterface.
//Josef
Comment #24
nithinkolekar CreditAttribution: nithinkolekar commented@jgullstr , just for info ...
When we say "Rendered entity" and configure as "Full Content", it should respect the "Manage Display" setting of rendered entity not just entityform but any entity in general , am I right?.
The reason I am asking is that in "Manage Display" of Entityform "Full Content" some fields are hidden but it is only working when form is viewed in entityform's direct submission link not when it is rendered inside node.Apologies and rephrasing above statement for future readers...
The reason I am asking is that in "Manage Display" of Entityform "Full Content" some fields are made hidden but it not working both when form is viewed in entityform's direct submission link and also when it is rendered inside node. See #26 for more info.
Comment #25
jgullstr CreditAttribution: jgullstr commentedAdded EntityAPIControllerInterface implementation guard, as settings are confusing for e.g. nodes when "Hide title" has no effect.
@nithinkolekar: You are correct that entities should be displayed as configured under their respective "Manage display" section. I don't quite follow what you cannot get working, can you provide more info / screenshots?
//Josef
Comment #26
nithinkolekar CreditAttribution: nithinkolekar commented@jgullstr never mind, before writing that tiny patch , I was just wanted to hide entityform's label by using title module. But entityform is a special case where it is not having title field but always shows its human-readable name just like block.
As for the "manage display" settings of entityform, it is not displaying as it was configured when attached to node and also when viewed using submission link.See screenshots
Comment #27
jgullstr CreditAttribution: jgullstr commentedAh, I see. The display settings are how to display the form submissions, not the form itself (Similar to how you configure node display under content types). To hide the form title without this patch, I suppose the quickest way would be to override its template or theme function.
//Josef
Comment #28
ndf CreditAttribution: ndf commentedI tried this patch with a taxonomy entity-reference and with the title module enabled. It didn't hide the title tough (talking about the title in the template file).
To me a more logical place would be the manage display tab, because thats where you configure the viewmodes.
Comment #29
dieuweThis feature is something I've been looking for on a few separate occasions, I'm glad to finally have found it.
Patch from #25 works great with a custom entity being referenced. Not using the title module.
Would love to see this in the next release.
Comment #30
rodrigoaguileraI tested #25 with entityforms and works as expected
Comment #31
nithinkolekar CreditAttribution: nithinkolekar commented@nielsdefeyter as mentioned by jgullstr at #27 manage display settings applied when entities are being viewed after submission also called as viewmode. That patch is for entity when it is being created AKA form submission mode. This usually helpful for entities like Entityform , Entity Registration or may be some more in future.
Comment #32
senzaesclusiva CreditAttribution: senzaesclusiva commentedSuccessfully applied the patch but I can't see option to hide title in a rendered entity field.
what am I doing wrong?
Comment #33
nithinkolekar CreditAttribution: nithinkolekar commentedI am not sure whether implementing using EntityAPIControllerInterface Interface should also work when "content : rendered node" is added as field in view?.
When rendered node is added to views field no options are available like "hide title" or "show links". Is this normal behavior ?
Comment #34
nithinkolekar CreditAttribution: nithinkolekar commentedsame as #32
Comment #35
jgullstr CreditAttribution: jgullstr commentedWhat kind of entities are you rendering? This patch only controls the $page flag in entity_view (See #23). The setting will only be available when referenced entities implement EntityAPIControllerInterface, entityforms being the prime use case. For other entities - nodes, taxonomy terms, users and the like - you will have to find an alternative solution.
Comment #36
nithinkolekar CreditAttribution: nithinkolekar commented@jgullstr
entity is of type node and I didn't followed #25 :(
Will see for other possible solution.
Setting back to RTBC because it is specific to EntityAPIControllerInterface
Comment #38
minorOffense CreditAttribution: minorOffense at Coldfront Labs Inc. commentedPatch fails against latest dev.
Comment #39
minorOffense CreditAttribution: minorOffense at Coldfront Labs Inc. commentedI've re-rolled the patch. However it needs test cases before I can commit it to dev.
Comment #40
minorOffense CreditAttribution: minorOffense at Coldfront Labs Inc. commentedRe-roll against dev.
Comment #42
minorOffense CreditAttribution: minorOffense at Coldfront Labs Inc. commented