Will Telligent supports Forms

Developer Space

Developer Space
Want to extend the Telligent Evolution platform? Collaborate with other developers and product experts here.

Will Telligent supports Forms

This question has suggested answer(s)

Hi Team,

Can we develop forms in the Telligent Platform.

Form may contain textboxes,dropdowns,listboxes etc...

Please let me know the possibility. Share us the best approach.

Thanks,

Krishna

All Replies
  • Yes, you should be able to do this with a custom widget via widget studio in the control panel.  You could submit the form via a Post to the same page (and handle it) or via AJAX to an attached .vm file $core_v2_widget.GetExecutedFileUrl('file.vm')

    Creating the form is the easy part, what you want to do with the data and how you secure it (if needed) is where the bigger question lies.

  • Thanks for the response Luke. Designing form easy it seems, we can use html controls in the widget.

    Saving form information is difficult. Is there any good way to save any forms after submission?

  • There are several ways you can process form data (depending on what you need to do).

    1.  Use AJAX and POST to a Telligent REST endpoint

    -Look at the last example on this page: http://telligent.com/community/developers/w/developer6/javascript-and-ajax.aspx   You should also read and attempt to follow the general guidelines on this page for general use of javascript in widgets.

    2.  Use AJAX and POST to a .vm file contained in your widget

    jQuery.telligent.evolution.post({
       url:"$core_v2_widget.GetExecutedFileUrl('yourWidgetFile.vm')",
       data{your json data},
       success:function(response) {}
    });

    3.  Post the form traditionally and handle the POST in your widget code

    #if($core_v2_page.IsPost)
       $core_v2_widget.ExecuteFile('processForm.vm')
    #else
       $core_v2_widget.ExecuteFile('displayForm.vm')
    #end

    Then to access the post data, you simply use this velocity object

    $core_v2_page.GetFormValue("postedValueKey")