App Post-Function Unexpected Behavior


I’m trying todo a simple postfunction and I’m using AUI and Velocity template. Ihave 2 weird behaviour that I’m not able to solve.

1- If I do not add and empty form, the form styling i not working, JIRA to not ssems to apply AUI styling to it.

2- When I have input tag all my params and send back to getDescriptorParams so I can use them but once I added the input and labels in a it no longer works.

Any Idea ?

<html lang="en">
    <!--Do not work if first empty form is removed-->
        <form class="aui">

        <form action="#" name="jiraform" class="aui">
            <div class="field-group">
                <label for="assignementGroup"> Group Assignment </label>
                <input class="text medium-field" 
                        type="text" id="assignementGroup" 
            #foreach ($option in ${options.entrySet()})
                <div class="field-group">
                    <label for="$option.getKey()">Template Name For $option.getKey()</label>
                    <input type="text"
                            class="text long-field" 
                            value="$textutils.htmlEncode(${descriptor.getText($!option.getValue())})" />