Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthortve
    • CommentTimeMay 8th 2008
     
    Here is some sample code that works in my Ruby on Rails installation:

    In your controller:

    def feedback
    if params[:tfa_next]
    url = "/rest/#{params[:tfa_next]}"
    else
    url = "/rest/forms/view/1234"
    end

    response = Net::HTTP.get_response("app.formassembly.com", url).body
    @form_head, @form_body = response.split('<!-- FORM: BODY SECTION -->')
    end

    In your view:

    <% content_for("head") do %>
    <%= @form_head %>
    <% end %>
    <h1>Feedback form</h1>

    <%= @form_body %>

    In your layout:

    <head>
    [...]
    <%= yield :head %>
    </head>
    • CommentAuthorcedsav
    • CommentTimeMay 8th 2008
     
    Thank you very much for the code sample. We'll add it to the documentation.