I'm using Elgg 3.3.8 version and curious if there is an Elgg built-in function to remove particular form fields. For example, removing the 'Excerpt' field from the blog/save form.
Thanks in advance!
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
- seri_ng@seri_ng
seri_ng - 0 likes
- Nikolai Shcherbin@rivervanrain
Nikolai Shcherbin - 0 likes
- Jerome Bakker@jeabakker
Jerome Bakker - 0 likes
- seri_ng@seri_ng
seri_ng - 0 likes
- Team Webgalli@webgalli
Team Webgalli - 0 likes
You must log in to post replies.Override 'forms/blog/save' view and delete/hide the field with 'excerpt' name in your custom view.
Thanks Nikolai for the response.
Sorry for not explaining what I try to achieve. I am aware of the override approach :). What I try to do is calling the blog/save form excluding fields like 'Excerpt', 'Tags', etc. in the lightbox popup. But for a full view, I will leave the blog/save form as is. I am just wondering if there is a magic function in Elgg 3 to exclude input fields without overriding the original forms
I know I can simply create the forms/blog/save_with_less_fields in one of my plugin and remove unwanted fields. Then use forms/blog/save_with_less_fields form for the popup and forms/blog/save for the regular view.
No such function (
I tried this hook also but without success:
Suggestion: in the lightbox use CSS to hide the fields ;)
Only works for non required fields
@Jerome, that's exactly what I did - using JS/CSS to hide the fields :)
Good to know that this approach only works with non-required fields.
Thanks Jerome!
If you are using JS, you can remove the required attribute from the fields also.