Disable field using CSS

Hi, how can I disable a field using CSS in the style property setting for a field?

I have found this CSS: pointer-events:none;

It does the job but I want to hide the Lookup/drop down field radio icon?

Dear @DryChips,
Why do you not want to use JavaScript. pointer-events:none; doesn't work in all the cases, it's better to use the JavaScript to disable a field.

fd.field('Title').disabled = true;

1 Like

How would I add this into the Custom property in the field? I get an error "Custom component defined incorrectly"

Dear @DryChips,
Why do you need a custom component? This is a very advanced property, not even described in our docs - it's mostly for internal use as it's really challenging to design custom components for fields.

What's the result you're trying to achieve? It should be possible with JavaScript or CSS.

No worries :joy:

I just wanted to organize it better in the code.

Just out of curiosity, what is the custom component used for?

Dear @DryChips,
Technically, it's possible to write a completely custom HTML component for any field - pretty much designing a field from the ground up. For example, we use it in our Helpdesk product to create unique fields for the Tickets' forms.

1 Like

I see, why don't you guys create some documentation for this for other front-end developers in the community to benefit so the field can have more advance features for better user-experience.

Dear @DryChips,
In most cases such customization is unnecessary, and it does require a solid skill while we're trying to make our product easier to use for regular users. We're more focused on making the product easier to understand and expanding the functionality one can achieve without using too much code.

It would be great to add an example or two later on, but there are many other important matters that we want to describe first.

1 Like

Awesome, that's understandable!

Can I ask, what advice would you give to newbie web-developer? I really want to get better at this skill and need some advice on where to begin and become a better developer.

Dear @DryChips,
This is a little beyond the scope of this community, so it's best to PM questions like this.

I would personally recommend freeCodeCamp as a great free resource to get started with web development - https://www.freecodecamp.org/ This is something I've tried myself, and it helped me more than many paid courses. It's got a good course structure and tests along the way, allowing you to learn and practice many areas of web development.

If you have any additional questions outside the product - feel free to send me a private message, I'll try to help when I have the time.

1 Like

Thank you Nikita! Вы очень добры :grinning:

1 Like