1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Unable to reload form field values while redirecting on same page for reCAPTCHA resps

Discussion in 'Oracle Webcenter Suite (formerly Oracle ECM)' started by srivastavaa1, Aug 20, 2010.

  1. srivastavaa1

    srivastavaa1 Active Member

    Likes Received:
    Trophy Points:
    Hi Sadik,

    I am implementing recaptcha in my custom html forms which i have defined in custom component resource.for recaptcha implementation i am using recaptcha4j-0.0.7.jar ,on form submit it calls my custom service 'MyMail' which executes javafunction where i am calling recaptcha fuction to verify recaptcha text and after that sending Form details to given Email Address.But when i am redirecting to same page for sending message for recaptcha response all form fields values goes blank and all m_binder data will lost.

    Is there any other way to retain form values when my service returns recaptcha response?

    Form Code:

    <form id="DataForm10" class="form" action="<$HttpCgiPath$>?IdcService=My_MAIL" method="post">
    <fieldset class="rc_grey">
    <input type="hidden" name="Email" value="<$email$>"/>
    <input type="hidden" name="RedirectUrl" value="<$ssGetServerRelativeUrl(siteId, nodeId)$>"/>

    <label for="name"> *Your Name</label>
    <input type="text" name="name" id="name" class="mandatory"/>

    <label for="reference_no"> *Your Reference No (located top left of payslip) </label>
    <input type="text" name="reference_no" id="reference_no" class="mandatory" />

    <label for="dob"> *Your Date of birth</label>
    <input type="text" name="dob" id="dob" class="mandatory"/>

    <label for="ni_number"> *Your NI Number</label>
    <input type="text" name="ni_number" id="ni_number" class="mandatory"/>

    <$include recaptcha_inc$>

    <input type="submit" value="Send" class="button" />

    Java Code:

    if (reCaptchaResponse.isValid()) {

    // this command is used to send email to the client. The message
    // sent is a template (Mail), and the data to format the
    // message is taken out of m_binder, contained in "this"
    boolean response=InternetFunctions.sendMailTo(emailStr, "Mail", subject, this.m_service);

    } else {

    }catch(Exception e){


    so please tell me is there any other way to retain form fields values on submit .