jQWidgets Forums

This topic contains 4 replies, has 2 voices, and was last updated by  Peter Stoev 10 years, 7 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Set initial value on Input field #60587

    Andrew Cooper
    Participant

    I’ve got your standard Edit User form. If I’m editing an existing user I want the form to be auto-populated with the user’s data. I’ve tried this a couple of ways and none are working.

    $(“#edit_username”).jqxInput({
    displayMember: row.username,
    valueMember: row.username
    });

    Neither of these attributes seem to make the Input display the current user’s data. What exactly are displayMember and valueMember if they aren’t what the input displays and its current value respectively? I can get the username to show up by using placeHolder but that doesn’t seem like the correct way to go to me.

    Andrew

    Set initial value on Input field #60595

    Andrew Cooper
    Participant

    Nevermind. I enclosed the inputs in a form tag and it is working now. Apparently that made all the difference.

    Andrew

    Set initial value on Input field #60596

    Andrew Cooper
    Participant

    I lied. It didn’t work. It was Chrome auto-filling the username and password fields. It is still not putting the values into the fields the way I expect.

    Set initial value on Input field #60598

    Andrew Cooper
    Participant

    I was trying to be too tricky. I did it through jQuery instead of jqWidgets. $(“#input”).val(“some value”);

    Got to remember that straight jQuery works too.

    Andrew

    Set initial value on Input field #60649

    Peter Stoev
    Keymaster

    Hi Andrew Cooper,

    displayMember and valueMember should be used when your Input is bound. They define the items display label and value. To programmatically set a value of jqxInput, you have to use its “val” method as it is documented in our API.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.