Prevent duplicate form submission from same user

What's the best way to prevent the same person/computer from
submitting a form? I am wondering about cookies, ip address,
etc.

Rking1966 wrote
I am wondering about cookies...
You got me wondering, too. I thought of something like:
formPage.cfm
============
<cfif isDefined("cookie.isFormSubmitted") and
cookie.isFormSubmitted>
You have already submitted the form. You may only do so
once.<br>
<p>
<a href="someOtherBusinessPage.cfm">To
business</a>
</p>
<cfelse>
<form action="actionPage.cfm" method="post">
<input name="field1" type="Text">
<input name="send" type="Submit" value="Send">
</form>
</cfif>
actionPage.cfm
=============
<cfif NOT isDefined("cookie.isFormSubmitted")>
<cfcookie name="isFormSubmitted" expires="never"
value="true">
</cfif>
<!---
Business code to process submitted form fields
--->

Similar Messages

  • Preventing duplicate form submission when page is loaded from history

    Hi
    We have record insertion forms some of which insert unique
    records into sql databases and some which may not. Is there a way
    of stopping the user pulling the page from history (or using the
    back button) and then resubmitting the data?
    I have put a trigger on the databases that basically updates
    existing data rather than re-inserting it if a duplicate is entered
    but as some of the record submissions are not unique this isn't
    always possible. I would also rather restrict the submission client
    side to reduce bandwidth and database calls.
    I have tried various 'no caching' techniques on the page but
    none seem to work. Anyone have any bright ideas ... I am all out of
    ideas bright or not!!!
    TIA
    Karen

    Karen
    I have used session variables to control this sort of thing.
    Basically the
    insert/update statement tests for the existance of a variable
    with a
    particular name. If no variable exists then this will
    indicate that the
    request is coming from a history file, and it will not allow
    the process.
    Equally as part of the insert process change the value in the
    variable and
    do not allow and insert if the variable holds that value.
    Paul Whitham
    Certified Dreamweaver MX2004 Professional
    Adobe Community Expert - Dreamweaver
    Valleybiz Internet Design
    www.valleybiz.net
    "big_old_bird" <[email protected]> wrote in
    message
    news:e2totv$ec9$[email protected]..
    > Hi
    >
    > We have record insertion forms some of which insert
    unique records into
    > sql
    > databases and some which may not. Is there a way of
    stopping the user
    > pulling
    > the page from history (or using the back button) and
    then resubmitting the
    > data?
    >
    > I have put a trigger on the databases that basically
    updates existing data
    > rather than re-inserting it if a duplicate is entered
    but as some of the
    > record
    > submissions are not unique this isn't always possible. I
    would also
    > rather
    > restrict the submission client side to reduce bandwidth
    and database
    > calls.
    >
    > I have tried various 'no caching' techniques on the page
    but none seem to
    > work. Anyone have any bright ideas ... I am all out of
    ideas bright or
    > not!!!
    >
    > TIA
    > Karen
    >

  • Preventing duplicate form submission

    how do i prevent from the form being submitted twice in case user clicks the submit button twice?

    Search at the net "struts tokens".

  • How to prevent dupilcate form submission in JSF 1.x

    Hi All
    How to prevent dupilcate form submission in JSF 1.x application. As of now ,when the user clicked the submit button two times , application inserts 2 records in database.
    Please suggest how to prevent dupliacte form submission without using Javascript. Kindlly share examples if any.
    Regards,
    DEV

    Your problem is not really double submission but the fact that your application allows double insertion. The fix is functionally easy but technically very cumbersome: before inserting, check if the data already exists. If you build in such a guard you also protect against other methods of causing a resubmission, such as the browser back button.
    PS: what's the deal with the no javascript limitation? You do realize that when you use JSF you're tanking your application full of javascript, right?

  • Is their way to prevent a form data from being lost when a validation fails

    Is their way to prevent a form data from being lost when a validation fails?

    So I would use APEX_COLLECTION (there is some information in APEX documentation).
    Read all data you need to keep after submit and save them to your collection. Then, if validation fails, show report with data not from base, but from your collection. You have to create process, which creates collection, and you need to modify your report definition to get data not only from DB but also from collection.
    If you have any questions feel free to ask.
    Regards,
    Przemek
    Edited by: Przemek on 2009-01-10 17:47

  • How to prevent duplicate web pages from loading

    <blockquote>Locking duplicate thread.<br>
    Please continue here: [[/questions/930219]]</blockquote>
    how to prevent duplicate web pages from loading

    <s>Hi berternie, can you describe this in more detail?
    Are you saying the identical page loads in two different tabs? When does that happen -- when you click a link? or when you use a bookmark?
    Or do you have multiple tabs open every time you see your home page (i.e., when you start up, open a new window, or click the home icon)?</s>
    I see, you have more info in this thread: https://support.mozilla.org/en-US/questions/930219

  • Preventing the Duplicate Form Submission??

    Hi,
    How to prevent the duplicate form from been submitted without disabling the back button in IE???
    Thanks,
    JavaCrazyLover

    I had the same wonder. I found the following articles are quite helpful. They give detailed background info, a design pattern to deal with it, and a Struts implementation.
    http://www.theserverside.com/articles/content/RedirectAfterPost/article.html
    http://www.theserverside.com/articles/content/RedirectAfterPost2/article.html
    Cheers,
    littlemonster

  • Copy Form Setting from one user to another

    Hi,
    I am using 2005A.
    How to copy form setting (rows and UDFs at header) from one user to another user?
    Thanks

    Hi Ming Ming On,
    I found a note couple of years ago.
    I can't remember the note number, and I attach the note here.
    Solution
    The following queries enables you to set preferences for one user and copy those to another user who is supposed to have the same preferences.
    Explanation for the queries variables:
    dest - Company database name
    sourcid - Represents the user ID from whom the preferences will be copied.
    destid - Represents the user ID to whom the preferences will be copied.
    How to get the user ID?
    From SAP Business One query interface or from the SQL Query Analyzer, run the query as follows:
    1. SELECT T0.U_NAME, USERID FROM OUSR T0 FOR BROWSE
    2. From the query's results, identify both the sourcid and the destid.
    3. In order to copy the preferences from sourcid to destid, run the query as follows:
    a) Replace the text dest with the company database name.
    b) Replace the text sourceid with the user ID from which the preferences will be copied.
    c) Replace the text destid with the user ID to which the preferences will be copied.
    d) Use dest, if exists (select 1 from sysobjects where name = 'temp_dev_sup')
    e) Begin - drop table temp_dev_sup
    f) End - select * into temp_dev_sup from cprf where usersign='sourcid'
    Deleting a certain user:
    Delete from cprf where usersign='destid'
    Update userid in temporary table:
    1. Update temp_dev_sup
    2. Set usersign='destid'where usersign='sourcid'
    Insert preferces into CPRF table
    1. Insert into cprf
    2. Select "" from temp_dev_sup where usersign='destid*'
    &#50696;&#51228;)
    1. Use TEST_MONAMI
    2. drop table temp_dev_sup
    3. Delete from cprf where usersign='2'
    4. select * into temp_dev_sup from cprf where usersign='1'
    5. Update temp_dev_sup
        Set usersign='2'where usersign='1'
    6.  Insert into cprf
         Select * from temp_dev_sup where usersign='2'

  • Concurrent login from same user

    Can anyone help me in understanding if sharepoint 2013 has any built in feature to stop same user from logging in from various machines/browsers/mobiles?

    There is not. One thing to remember with HTTP is that it is stateless. That is, a connection is made to retrieve the resources on the web page, and then that connection is terminated.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • How to prevent concurrent Logon from same User ID

    I have my project setup in the following way :
    The User enters the UserName / Password in an html file and when authenticated is directed to the welcome.jsp which is a jsf jsp in the 'restricted' folder.
    Code for html file:
    <form  name="loginFrm" method="post" action="j_security_check">
          <p>Log in to access restricted zone.</p>
          <table>
           <tr>
            <td>User name</td>
            <td>
             <input id="j_username" type="text" name="j_username"/>
            </td>
           </tr>
           <tr>
            <td>Password</td>
            <td>
             <input type="password" name="j_password"/>
            </td>
           </tr>
           <tr>
            <td> </td>
            <td>
             <input type="submit" value="Login" onclick="document.body.style.cursor='wait';"/>
            </td>
           </tr>
          </table>
         </form>I have a backing bean for security which checks whether the user logged is is authorized for certain operation on the web pages.
    The backing bean code is:
      public boolean isTracker()
        ExternalContext ectx =
          FacesContext.getCurrentInstance().getExternalContext();
        boolean tracker = false;
        tracker = ectx.isUserInRole("TRACKER");
        return tracker;
      }The in the jsp if I want to display a field depending on the role, I do :
    <tr:outputText styleClass="showWarning"
                                     rendered="#{security.tracker}"
                                     value="#{messages[\'mandatory.field.message\']}"/>Also I use tiles for my project. One requirement is to print the name of the user logged in on every page. Thats done by adding the following code to layout.jsp
    <f:facet name="infoUser">
            <tr:outputText styleClass="loginInfo"
                           value="#{facesContext.externalContext.userPrincipal.name} is logged in"/>
          </f:facet>My question is how can I implement a solution that not more than one person can log into the site with the same UserName simultaneously.

    Thanks BalusC,
    Can you provide me with some sample code, or is it available on your site ?
    I have added the code to the security backing bean :
    public class SecurityInfoBackingBean
      extends AbstractBackingBean
      private static Set<User> loggedInUsers = new HashSet<User>();
      public boolean isUserLoggedIn(User user) {
       return loggedInUsers.contains(user);
    }How can I use the above code the correct way ?

  • Duplicate form submission

    We created a form for our website to receive inquirys. On a regular basis we receive a duplicate of the same email.
    Can anyone help?

    We do not prevent people from submitting multiple times. Can you confirm if those duplicate are because people have submitted more than once or maybe click on the submit button multiple times?
    Gen

  • Prevent Duplicate Output Trigger from Item Level

    Hi,
    We have a requirement of whenever a pricing error happen to send the whole Order information from ECC to an external system through Idocs / Output Trigger.
    The Output for pricing error can be configured by default at the item level. Hence if an ORder has multiple lines that have pricing issues we can get the same Order information sent twice bacuse of output getting triggered more than once.
    Any way I can prevent the duplicate output trigger when multiple items for the same order has issues.
    Regards,
    Arunava

    Hi Arunava,
    You can create a Output Routine using VOFM tcode and attach the routine to your Output type in NACE tcode.
    Inside the routine you can keep check based on the line items / order information.
    Thanks & Regards,
    Ramya.

  • Prevent multiple logins of the same user in portal

    Hi Experts,
    I have a requirement wherein I am needed to ensure that whenever a user tries to login to the portal, I should check whether this user already has a session active. If yes, I should not allow this user to login again. As in this user should not be able to login by opening a new browser window or by trying to login from some other system.
    However if there are no existing sessions for this user then allow her/him to log in.
    Is there any way I can achieve this by changing any parameters in Visual Admin / Config Tool or do I have to implement this functionality by making modifications in the masthead .par file?
    Best Regards,
    Saurabh Vakil.

    Hi Saurabh,
    you can do this by modifing the headerIview.jsp by using session variables.
    when a user logs into portal you have to keep his details in a session and check them everytime when he tries to login again.if it is not the first time then throw and error message
    you need to change the par file. code will be something like this
    session.setAttribute("user",request.getUser());
    if(session.getAttribute("user")!=null)
    And for preventing from backend -
    By changing the parameter - login/disable_multi_gui_login you can do this.
    Check below sap link - http://help.sap.com/saphelp_erp2004/helpdata/en/22/41c43ac23cef2fe10000000a114084/frameset.htm
    Regards,
    Sen
    Edited by: prodyut kumar sen on Dec 20, 2010 1:22 PM

  • Facing issue on request submission from Self user registration with workflow.

    HI Everyone,
    We have a use case where in User Registration process has a two stage workflow.
    In the first stage approver(Common admin) would open the request and approve it updating the organization to which the user belongs to and the the work flow should be routed to the selected organization admin in the second stage based on the org selected in the first level of approval.
    For this we have devloped a workflow and applied the same and now facing the issue once the request moves to Second level for approval.
    Request gets failed.
    Below is the exception found on clicking Request status from Track Requests.
    Can you kindly let me know any possible resolution to resolve this.

    Error log :
    IAM-2050126 : Invalid outcome com.oracle.bpel.client.BPELFault: faultName: {{http://schemas.oracle.com/bpel/extension}runtimeFault} messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage} parts: {{ summary=<summary>oracle/iam/platform/OIMClient</summary> ,detail=<detail>java.lang.NoClassDefFoundError: oracle/iam/platform/OIMClient
    at orabpel.approvalprocess.ExecLetBxExe0.execute(ExecLetBxExe0.java:195)
    at com.collaxa.cube.engine.ext.bpel.common.wmp.BPELxExecWMP.__executeStatements(BPELxExecWMP.java:47) 
    at com.collaxa.cube.engine.ext.bpel.common.wmp.BaseBPELActivityWMP.perform(BaseBPELActivityWMP.java:173) 
    at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:2718)
    at com.collaxa.cube.engine.CubeEngine._handleWorkItem(CubeEngine.java:1197)
    at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1100)
    at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:76) 
    at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:251) 
    at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:330) 
    at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:4652)
    at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:4583)
    at com.collaxa.cube.engine.CubeEngine._createAndInvoke(CubeEngine.java:714)
    at com.collaxa.cube.engine.CubeEngineSecurityManager$2.run(CubeEngineSecurityManager.java:101) 
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)
    at oracle.security.jps.internal.jaas.AccActionExecutor.execute(AccActionExecutor.java:74) 
    at oracle.security.jps.internal.jaas.AbstractSubjectSecurity$ActionExecutorWrapper.execute(AbstractSubjectSecurity.java:242) 
    at oracle.security.jps.internal.jaas.CascadeActionExecutor$SubjectPrivilegedExceptionAction.run(CascadeActionExecutor.java:83) 
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363) 
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146) 
    at weblogic.security.Security.runAs(Security.java:61)
    at oracle.security.jps.wls.jaas.WlsActionExecutor.execute(WlsActionExecutor.java:51) 
    at oracle.security.jps.internal.jaas.CascadeActionExecutor.execute(CascadeActionExecutor.java:56) 
    at oracle.security.jps.internal.jaas.AbstractSubjectSecurity$ActionExecutorWrapper.execute(AbstractSubjectSecurity.java:242) 
    at com.collaxa.cube.engine.CubeEngineSecurityManager.performActionAsSubject(CubeEngineSecurityManager.java:79) 
    at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:555)
    at com.collaxa.cube.engine.delivery.DeliveryService.handleInvoke(DeliveryService.java:531) 
    at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(CubeDeliveryBean.java:319) 
    at sun.reflect.GeneratedMethodAccessor4136.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310) 
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) 
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) 
    at com.oracle.pitchfork.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:103) 
    at oracle.security.jps.ee.ejb.JpsAbsInterceptor$1.run(JpsAbsInterceptor.java:113) 
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460) 
    at oracle.security.jps.ee.ejb.JpsAbsInterceptor.runJaasMode(JpsAbsInterceptor.java:100) 
    at oracle.security.jps.ee.ejb.JpsAbsInterceptor.intercept(JpsAbsInterceptor.java:154) 
    at oracle.security.jps.ee.ejb.JpsInterceptor.intercept(JpsInterceptor.java:113) 
    at sun.reflect.GeneratedMethodAccessor1077.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310) 
    at com.oracle.pitchfork.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:68) 
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) 
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) 
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 
    at com.oracle.pitchfork.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:34) 
    at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54) 
    at com.oracle.pitchfork.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:42) 
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 
    at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) 
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) 
    at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) 
    at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 
    at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) 
    at com.sun.proxy.$Proxy330.handleInvoke(Unknown Source)
    at com.collaxa.cube.engine.ejb.impl.bpel.BPELDeliveryBean_5k948i_ICubeDeliveryLocalBeanImpl.__WL_invoke(Unknown Source)
    at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(SessionLocalMethodInvoker.java:39) 
    at com.collaxa.cube.engine.ejb.impl.bpel.BPELDeliveryBean_5k948i_ICubeDeliveryLocalBeanImpl.handleInvoke(Unknown Source)
    at com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessageHandler.handle(InvokeInstanceMessageHandler.java:30) 
    at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:141) 
    at com.collaxa.cube.engine.dispatch.BaseDispatchTask.process(BaseDispatchTask.java:89) 
    at com.collaxa.cube.engine.dispatch.BaseDispatchTask.run(BaseDispatchTask.java:65) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
    at com.collaxa.cube.engine.dispatch.Dispatcher$ContextCapturingThreadFactory$2.run(Dispatcher.java:933) 
    at java.lang.Thread.run(Thread.java:745) </detail> ,code=<code>java.lang.NoClassDefFoundError</code>} cause: {oracle/iam/platform/OIMClient} received from SOA for the request id 214.

  • Thunderbird on Ubuntu; receives duplicate imap & pop3 for same user name- how to delete imap? (says 'in use', will not allow entry into Settings)

    Frontier is a telco that has changed to Yahoo mail recently.
    Thunderbird on Ubuntu 14 LTS behaves somewhat differently than on a Windows machine; I can open Account Settings and will see 2 duplicate account entries in the left panel, but when I clcik on either accounts Server Settings, I only get a blocking message that says "Account Name in Use. Please enter a different account name." I'm unable to determine which is imap or pop, or delete anything...
    Thanks for any help in advance!

    Update to my original discussion:
    If the problem persists, rinse & repeat steps from the original post.
    Alternate Solution: If problem still persists and your imap email is not syncing correctly, call customer support of your email provider (in my case it was GoDaddy). Tell them the problem and ask them to do a "ReSync". Make sure your imap email account is set up on your iPhone before they perform the resync. I tried this and its been a week since I had any problems. If you're lucky this could fix other problems that are not listed in this discussion thread.
    Good luck & Cheers.

Maybe you are looking for