Hide options in a select field - [Solved]

More
12 years 9 months ago #17770 by ggppdk
Alosio, maybe you can create 2 different fields. One with some options and another with some other options, and give access of one field to some users and the other to some other users. I dont know if this would accomplish what you have in mind.

Also, try to think based on the tools you have available (some times it is possible to do with the existing tools/features).

You are asking of custom solutions that require time for someone to help you ... if you are making money out of this site maybe you can hire a professional or use some site like freelancer.org or something.

If some feature request is generally useful, i can implement it, but in a timely manner. I have put your request as an TODO feature :-)

Best Regards


-- 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
12 years 9 months ago #17772 by aloisio
Hello
I'm doing a site for a great friend and I will not charge.
If I have to pay for the development of a custom component, I can consult on this need.
I think there would be no problem.
You believe that using "css" to hide field options "select" is not possible.
This field will be used as a filter in the light category.

Regards

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

More
12 years 9 months ago #17777 by ggppdk
Yes of course you can use CSS to hide options

If you use Javascript (Javascript runs inside the user's browser, after page is downloaded) to hide something, it can be done by either removing the html code of the select options completely out of the html document model or by hiding the select options by setting the style (CSS) property of them ...

But to hide options you must first attach some CSS class to them at creation time (PHP). But if you are able to attach CSS class to them, then it is easier not to output them in the first place. So we come back to the problem that i described in my previous message.

Regards


-- 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
12 years 9 months ago #17781 by aloisio
Hello
You tell me just add css to create the menu item, it not works.
Well I'd like to try.
I've only managed to completely hide the field, but not the options individually.
Using javascript I've also got, hide choices, but I do not think you can add javascript and css is added, the menu item.

Regards

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

More
12 years 9 months ago #17783 by ggppdk

If you use Javascript (Javascript runs inside the user's browser, after page is downloaded) to hide something, it can be done by either removing the html code of the select options completely out of the html document model or by hiding the select options by setting the style (CSS) property of them ...

But to hide options you must first attach some CSS class to them at creation time (PHP). But if you are able to attach CSS class to them, then it is easier not to output them in the first place. So we come back to the problem that i described in my previous message.

Alosio,

You cannot hide some options of the select field with css unless you have a way to decide which must of them must be hidden. You say to use CSS, if so, you need to have them assigned a class at creation time.

If you are able to mark some options with a CSS class to hide them completely, for the full lifetime of the current page. THEN WHY output them in the first place ???????

Either way you have to mark them at creation time, otherwise if you do not mark the select options with some css class, then you javascript code must make database queries to find out which option to hide and then hide them.

I think i have been very cleared and detailed on this one.

Best Regards :-)


-- 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
12 years 9 months ago #17789 by aloisio
Hello

You cannot hide some options of the select field with css unless you have a way to decide which must of them must be hidden


The field options "select" to be hidden to each user are preset and are always the same.

Regards

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.322 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