AnsweredAssumed Answered

handle data submit by a form

Question asked by thinhnk on Mar 1, 2013
Latest reply on Mar 7, 2013 by thinhnk
I face a problem when learn alfresco. I hope that someone can help me.
I create webscript including file test.post.json.js:

var email = json.get("email");
model.email = email;


and template response test.post.json.html to handle data from a form:

${email}


This is the form:

<form id="${args.htmlid}-form" action="/share/proxy/alfresco-noauth/metadata/modules/test" method="post">
    <div>
        <label>Email</label><input type="text" name="email" />
    </div>
    <div class="button-region bdft">
   <input type="submit" class="g-button" id="${args.htmlid}-ok" value="${msg("button.ok")}" />
   <input type="reset" class="g-button" id="${args.htmlid}-reset" value="${msg("button.reset")}" />
    </div>
</form>

But when submit the form, errors happen. I change the template response as follow:

<p>TEST<p>


no error, then I recognise that code inside test.post.json.js did not run at all. :( I made what wrong? Please help me, even if this may be a silly question. Thank you very much!

Outcomes