Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7928739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T19:49:55+00:00 2026-06-03T19:49:55+00:00

I am trying to automatically fill a form from cookie data if the user

  • 0

I am trying to automatically fill a form from cookie data if the user already visited the site and checks the remember me checkbox…my cookie contains an array of data…i am trying to fill the form with array data..

here is the sample code

Cookie_check: function () {
            var Cookie_Array = registry.byId("form").getChildren();
            console.log(Cookie_Array);
            var Cookie_Info = new Array();
            dArrayUtil.forEach(Cookie_Array, function (item, i) {
                Cookie_Info.push(item.value);
            });
            console.log(Cookie_Info);
            //set cookie
            cookie("cookie_name", dJson.toJson(Cookie_Info), { expires: 5 });

            //get cookie infor into an array
            var cookie_name = dJson.fromJson(cookie("cookie_name"));
            console.log(cookie_name);

            //fill the form using the cookie information


            dArrayUtil.forEach(cookie_name, function (item) {

                    console.log(item);
                    registry.byId("form").setFormValues(item);

            });

        },

I have couple of questions–
1. How to check if there is a cookie already and set the form with the cookie information?(in the above function i am missing the condition when i will be filling the form with cookie data (array))
2. How do i pass this function on load of the wizard pane?

Any help greatly appreciated.

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T19:49:56+00:00Added an answer on June 3, 2026 at 7:49 pm

    How does this cookie crumble?

    require(["dojo/dom-form", "dojo/cookie"], function(domForm, dCookie){
    
      function beforeFormSubmit() {
        dCookie(
             "formdata",
             domForm.toJson("myForm"),
             {expires: 5}
        );
      }
      function onWizardPaneShow() {
        var formData = dCookie("formdata");
        dojo.query("#myForm input").forEach(function ( inputEl) { 
           if(inputEl.name && formData[inputEl.name])
              inputEl.value = formData[inputEl.name];
        });
      }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to fill-out a form automatically and press a button on that form
I'm trying to automatically fill and submit an HTML form on the iPhone and
We are trying to have faxes automatically be sent from within an SSIS package.
I'm trying to make a script that automatically starts uploading after the data has
I'm trying to make this blue line (a div) automatically fill the rest of
I am using reportlab to generate a pdf report automatically from dynamic data. As
I'm trying to automatically switch my background image in wordpress depending on the visitors
I'm trying to automatically compress both CSS and JS using maven and this plugin
I am trying to automatically figure out which Delphi version (of Delphi 5 to
I'm trying to login automatically in a website using Perl with WWW::Mechanize . What

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.