We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29181
    • 480 Posts
    Hi,
    I’ve slightly adjusted the webloginpe.class.php from line 1460 to 1495 because I want to be able to use inputHandlers like this
    <label for="'.$DOMid.'" id="'.$DOMid.'Label">'.$label."</label><input type="checkbox" id="'.$DOMid.'" name="'.$name.'" />";


    as opposed to

    <label for="'.$DOMid.'" id="'.$DOMid.'Label">'.$label."<input type="checkbox" id="'.$DOMid.'" name="'.$name.'" /></label>";


    i.e. I don’t want the form element to be encased in the label tag. So I changed the checkbox,radio and select if statements accordingly.

    Unfortunately it isn’t making any changes at all.

    Is the cache the problem? I tried emptying the Modx cache by going Site => Clear cache in the manager, also user the web dev toolbar for FF clear the cache, but it just isn’t making any changes. Are these placeholders being stored somewhere? An alternative maybe that I’m changing them in completely the wrong place.

    Any input would be greatly appreciated.
    Taff
      Adrian Lawley: www.adrianlawley.com
      • 28033
      • 925 Posts
      I swore Scotty said something about where v1.4.0 would make it so HTML/etc. could be used in inputHandler, back when WLPE was still in the single topic in the Repository.
        My Snippets
        -> PopUpChunk v1.0
        • 26435
        • 1,193 Posts
        Actually, I am getting rid of the label all together. If you want a label you would have to do something like:
        <label for="myFormInput">
            [+form.whatever+]
        </label>
        



        -sD-
        Dr. Scotty Delicious, DFPA.
          Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
          All of the above... in no specific order.


          I send pointless little messages
          • 29181
          • 480 Posts
          Thank you both for replying!

          That sounds like a good move to increase flexibility grin Scotty

          I’m still not sure what I’m doing wrong though. None of my changes appear to be happening.

          Another example is in the Register function I would like to amend

          	    $fullname = $modx->db->escape($modx->stripTags($_POST['fullname']));


          as the client wants a first middle and last name field, which works fine and is populating my db as it should but if I do:

             $firstname = $modx->db->escape($modx->stripTags($_POST['first_name']));
             $middlename = $modx->db->escape($modx->stripTags($_POST['middle_name']));
             $lastname = $modx->db->escape($modx->stripTags($_POST['last_name']));
             $fullname = $firstname.$middlename.$lastname;


          or even

           $fullname = "Howling Mad Murdock"


          and save it, it will still leave that field blank, moreover, if I then use the default register template, it adds the $_POST[’fullname’] to the database...but it shouldn’t anymore after those changes.

          I’ve tried deleting the webloginpe snippet from the cache file completely, but somewhere it is still calling an older version of the class.

          Any idea where anyone?

          On a sidenote Scotty, this is a great snippet, thanks for sharing it!

          Taff
            Adrian Lawley: www.adrianlawley.com