By enRaiser

    We know it very well that we can append our view to any existing view by calling a function elgg_extend_view.

    But what happens if the view is a form. it works, but looks ugly because the save button is above your content. so in case you want to add any extra fields to the object then they become visible after the save button.

    the solution is as follow

    < screipt type='text/javascript'>

    window.onload = function() {
    var d = document.getElementsByClassName(‘elgg-foot’)[0];


    < ? php echo elgg_view("input/text", array("name" => “comment”));

    ? >

    By doing this way the newly added input/text will move above the submit button.

    Post navigation