Hi there,
I'm following the tutorial to build a blog and I couldn't make it work. It fails at the first try at
https://elgg.example.com/my_blog/add
which for me is:
http://localhost/elgg/bitacora/add
It does not actually show the adding form, but the plain code of it:
echo elgg_view_field([ '#type' => 'text', '#label' => elgg_echo('title'), 'name' => 'title', 'required' => true, ]); echo elgg_view_field([ '#type' => 'longtext', '#label' => elgg_echo('body'), 'name' => 'body', 'required' => true, ]); echo elgg_view_field([ '#type' => 'tags', '#label' => elgg_echo('tags'), '#help' => elgg_echo('tags:help'), 'name' => 'tags', ]); $submit = elgg_view_field(array( '#type' => 'submit', '#class' => 'elgg-foot', 'value' => elgg_echo('save'), )); elgg_set_form_footer($submit);
Any idea what I missed?
Thank you
Elgg version : Release - 2.2.0, Version - 2015062900
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
- jacintodavila@jacintodavila
jacintodavila - 0 likes
- iionly@iionly
iionly - 0 likes
You must log in to post replies.http://learn.elgg.org/en/stable/tutorials/blog.html#create-the-action-file-for-saving-the-blog-post
Thank you RvR, but I think the problem is in the previous code at
http://learn.elgg.org/en/stable/tutorials/blog.html#id3
It seems that $content .= elgg_view_form("my_blog/save"); which in my cases reads: $content .= elgg_view_form("bitacora/save"); does not actually creates the form. Do you know where I could find the details of elgg_view_form?
Thanks!
elgg_view_field() function has been introduced with Elgg 2.3, so it won't work on Elgg 2.2. For Elgg 2.2 the tutorial is different: http://learn.elgg.org/en/2.2/tutorials/blog.html. But I would suggest to rather update to Elgg 2.3 instead as Elgg 2.2 won't receive any updates anymore.