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 8380777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:32:35+00:00 2026-06-09T16:32:35+00:00

Being new to Dojo I’m trying to initialize a Dijit form with values, e.g.

  • 0

Being new to Dojo I’m trying to initialize a Dijit form with values, e.g. read from storage, XHR etc.

However, invoking form.setFormValues() causes an error TypeError: invalid 'in' operand this.formWidgets thrown by http://yandex.st/dojo/1.7.3/dojox//form/manager/_Mixin.js

Is there anything I’m doing wrong or is this a Dojo issue? (The complete sample is also found here: http://pastebin.com/7LUHr3iA)

<!-- language-all: lang-html -->
`
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.7.3/dijit/themes/claro/claro.css" media="screen">

    <script type="text/javascript">
        dojoConfig = {async: true,parseOnLoad: true};
    </script>
    <script type="text/javascript" src="http://yandex.st/dojo/1.7.3/dojo/dojo.js"></script>

    <script type="text/javascript">
        require(["dijit/form/TextBox","dijit/form/Button","dojox/form/Manager",
                "dojo/parser","dojo/dom","dijit/registry"], function () {});
    </script>
</head>
<body class="claro">

    <form id="myForm" method="post" data-dojo-type="dojox.form.Manager">

        <label for="name">Name</label>
        <input id="name" name="nameField" data-dojo-type="dijit.form.TextBox"/><br/>

        <label for="surname">Surname</label>
        <input id="surname" name="surnameField" data-dojo-type="dijit.form.TextBox"/><br/>

        <button data-dojo-type="dijit.form.Button">Submit</button>

        <script type="dojo/method" event="startup">
            var form = dijit.byId("myForm");

            form.setFormValues({
                nameField: "Hello",
                surnameField: "World"
            });
        </script>
    </form>
</body>
</html>
`
  • 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-09T16:32:36+00:00Added an answer on June 9, 2026 at 4:32 pm

    Dojo 1.7 is asynchronous. Code should take the form:

    require(["dependency"], function(dep) {
      // use dependency
    });
    

    There is no reason to believe dojox/form/Manager would be loaded when you try to reference it further down the page.

    The registry is the correct way to reference the widget, not 1.6 style code of the form dijit.byId. See livedocs.

    See also the dojo/domReady! plugin.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Being new to JQuery and trying to understand all the posts about different ways
Being new to this I really am trying to learn how to keep code
Being new to programming I read a lot of sample code and try to
I am trying to understand something a bit better with being new to C#,
I have a dijit.form.FilteringSelect using a dojo.store.JsonRest instance as the store. My back end
Being new to linq, I am having trouble trying to apply a filter to
Being new to using the declarative syntax of SqlDataSource I am trying to figure
I am just trying to do some basic dojo and dijit work. I can't
Being new to symfony2 and querybuilder, I am trying to select all my containers
Being new to c#, I don't understand how variables are passed between objects. My

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.