We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23217
    • 44 Posts
    I have this call to WebLoginPE:
    [!WebLoginPE? &type=`profile` &profileTpl=`TestProfile` &customFields=`cg_first_name,cg_last_name`!]

    the "TestProfile" Snippet looks like this:
    First Name: <input type="text" name="cg_first_name" value="[+user.cg_first_name+]"/>
    Last Name: <input type="text" name="cg_last_name" value="[+user.cg_last_name+]"/>

    <button type="submit" name="service" value="saveprofile">Save</button>
    <button type="submit" name="service" value="cancel">Cancel</button>

    The cg_first_name and cg_last_name fields magically appeared in my web_user_attributes_extended table

    The difficulty? When I edit the two text fields (say, put "aaa" in one and "bbb" in the other) and click the save button, no database update occurs. I am sure I am doing something boneheaded, but I cannot see it. Can anyone help?

    Thanks in advance.

    P
      • 28033
      • 925 Posts
      IIRC, I think you need to use the &inputHandler here.

      Basically, I think WLPE doesn’t know what to do with that custom field, hence why it’s not saving, and you need &inputHandler to "handle" the input for the snippet. tongue (lol at the pun)
        My Snippets
        -> PopUpChunk v1.0
        • 23217
        • 44 Posts
        Thanks for the reply Soshite.

        I was under the impression that input handlers were only for multi valued field types (such as combo boxes, check boxes, radio buttons). I do not see a reference in the docs to text boxes. Did I miss it? Or did I misunderstand what I read?

        P
          • 28033
          • 925 Posts
          Quote from: phayes at Aug 07, 2008, 11:28 AM

          Thanks for the reply Soshite.

          I was under the impression that input handlers were only for multi valued field types (such as combo boxes, check boxes, radio buttons). I do not see a reference in the docs to text boxes. Did I miss it? Or did I misunderstand what I read?

          P

          Hmm, maybe I was mistaken. Just to check, it says [++] in the documentation, right? (I haven’t edited that stuff for a while now, so I forget if that’s the right syntax.)
            My Snippets
            -> PopUpChunk v1.0
            • 23217
            • 44 Posts
            Well, [++] is definitely used for placeholders, but that should not affect the saving. The placeholders in my example should just show what is currently in the database for this user (when using WebLoginPE; the user.<field> syntax is specific to WebLoginPE, or so I believe).

            P
              • 23217
              • 44 Posts
              Doh!

              I found my issue (or at least the first one). You will note, my stuff is not within a <form> tag! No action occurs because no form is present!

              P
                • 23217
                • 44 Posts
                I think I also found a bug in WebLoginPE regarding saving data. I posted it in the bugs section.