• ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By jacmaes
      I'm sure it's been asked before on the forums, but I haven't found a relevant answer after multiple searches.  I have a form on the frontend that mirrors the user profile on the backend. After logging in, I want the user to be able to edit multiple fields on his or her profile. For simple text entries (e.g. First Name, Street Address, Phone Number or Email), and single options (e.g. radio buttons for Gender: male or female or select dropdowns for a Country list), I have no issue and everything works fine: the user first fills out the form then can go back and update whichever field they want. That's standard profile editing stuff from the frontend.
      But I hit a roadblock when I want to offer multiple choices. For example, I have a Select Options field set up to show multiple checkboxes for choosing various types of driver's licences. With the following code (edited for brevity):
      $licence_types = array('B1', 'B', 'A1', 'C1', 'D1'); // same options as defined in my select options field foreach($licence_types as $licence) { $content .= "<label><input type='checkbox' name='licences[]' value='$product'> $licence</label>"; } .... $user->of(false); $user->licences = $licences; $user->save(); $user->of(true); the user can successfully submit this info from the frontend form:

      But now how do I show them the result  of what they submitted when they go back and want to update their profile from the same form? In other words, how do I insert the checked='checked' (or simply 'checked') HTML in the previously selected checkboxes?  For example, if they selected the first two options –B1 and B– in the example above, how do I make these two checkboxes ticked?
      With the following loop, I can show the previously selected checkboxes:
      foreach($user->licences as $licence) { $content .= "<label for='$licence->id'> <input name='licences[]' type='checkbox' id='$licence->id' value='$licence->id' checked>$licence->title</label>"; }  
      How do I merge the two loops so that they see this, as expected:

       
      Maybe with in_array()? Any help would be greatly appreciated.
       
       
    • By Mustafa-Online
      Hi Everyone, It's Been a While Since i Started Working With The "Super Lovely ProcessWire" & I Absolutely In Love With It .
      But, sometimes i feel lost, because the lack of tutorials "Specifically Videos" - i wish  there will be more tuts made by the community & from the ones who have
      The Experience.
      1- Regarding to the user profile, is there any way to show fields in Tabs ?? or if there in way to attach pages to user will be fine
      2- Markup-Regions : Where i can find the Docs that are Related to them ??
       
      Thanx
    • By mrkhan
      Hello,
      i have managed to login and logout and change password for user from PW front end with the help of 
      https://processwire.com/talk/topic/1716-integrating-a-member-visitor-login-form/
      many thanks to @ryan
      but now i need it little advance
      1. i want to have option for login users to save some pages as FAV and can see in their profile.
      how exactly i can do that ?
      do i need to create some fields in users Template , how login users can press button on page to put as FAV & if he is not logged in it goto LOGIN Page.
      2. and User Name and Phone Number and Pic in user profile.
      Thanks
    • By Guy Verville
      Hi,
      This question is perhaps dumb. How can a user change his/her profile? I get this empty window when logged as un regular user.

      The fields are set to be vewable in the User template.

      There will be numerous users that will be able to write blog entries. What if I want to restrict tue editing to own's content?  In the following example, the user logged is not the author of the page. So he shouldn't be able to edit it.