Not Show Label in FORM

More
11 years 11 months ago #26085 by igcorreia
is there any code I can put in the plugin at the :
function onDisplayField(&$field, &$item)
So I can HIDE/DISABLE the filed label in the form view?

Please Log in or Create an account to join the conversation.

More
11 years 11 months ago #26092 by ggppdk
Replied by ggppdk on topic Not Show Label in FORM
The label does not depend on the onDisplayField() as this function creates the html only.

Also we do not have field specific id parameter for the label , which would make it easy to hide it via CSS

Maybe this mootools v1.1 code will do the trick:
Code:
<script language="javascript" type="text/javascript"> window.addEvent( "domready", function() { var thelabel = $('flexicontent').getElements('label[for=fieldname]'); thelabel .setStyle('display', 'none'); }); </script>


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago #26109 by igcorreia
Replied by igcorreia on topic Not Show Label in FORM
That one does the trick.

But I fond a way hehe :D

$field->label = '';

It will not show hehe :D

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago #26133 by ggppdk
Replied by ggppdk on topic Not Show Label in FORM
Yes but you need to override the template file of the item edit form,
if you do this already then manipulating $field->label is the preferred way


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago #26158 by igcorreia
Replied by igcorreia on topic Not Show Label in FORM
I found that without knowing, so this is the correct way?

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago #26171 by ggppdk
Replied by ggppdk on topic Not Show Label in FORM
I meant if you already override the item edit form template file, then altering the $field->label is the easier way.

Also if it is a custom field then you can set $field->label=''; inside the onDisplayField() function


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.302 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline