Jump to content

Search the Community

Showing results for tags 'frontend'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

  1. As some of you might have noticed recently there has been a large "Frontend Performance Talks Offensive" (not only) by Google Engineers. Here are some high quality (regarding content) Videos which i enjoyed very much and thought you also might be interested in. A Rendering Performance Guide for Developers by Paul Lewis: Performance Tooling by Paul Irish Your browser is talking behind your back by Jake Archibald Gone In 60fps – Making A Site Jank-Free by Addy Osmani http://addyosmani.com/blog/making-a-site-jank-free/ Any suggestions for more interesting performance related stuff are welcome!
  2. I am trying to do the following: create a frontend form that generates a new page that has the fields from a template that a specific page uses. I send the page ID to the form and get the correct template and its fields from there. The presentation part of this form works, but as soon as it is trying to save, the $form variable does not contain the fields from the specified template so it saves a new page without any fields. Here's what I've got so far, hopefully anybody can tell me what I'm doing wrong (I've got most of this code from examples found on this forum): $page_id = htmlspecialchars($_POST['select_product']); // page ID $page = $pages->get($page_id); $template = $page->template; // this is the template where we will get the fields from // make a form $form = $modules->get('InputfieldForm'); $form->method = 'post'; $form->action = './'; $form->attr("id+name",'subscribe-form'); // add the page's fields to the form $fields = $page->fieldgroup; foreach($fields as $field) { $inputfield = $fields->get("$field->name")->getInputfield($page); $form->append($inputfield); } // add template name field to the form $field = $modules->get("InputfieldHidden"); $field->label = "Template"; $field->attr('id+name','template_name'); $field->required = 1; $field->value = $template; $form->append($field); // append the field // add a submit button to the form $submit = $modules->get('InputfieldSubmit'); $submit->name = 'save_new_aanvraag'; $submit->attr("value", "Go"); $form->append($submit); // process the form if it was submitted if($this->input->post->save_new_aanvraag) { // now we assume the form has been submitted. // tell the form to process input from the post vars. $form->processInput($this->input->post); // see if any errors occurred if( count( $form->getErrors() )) { // re-render the form, it will include the error messages echo $form->render(); } else { // successful form submission $p = new Page(); // create new page object $p->template = $input->post->template_name; // set template $p->parent = $pages->get('/aanvraag/'); // set the parent foreach($form as $field) { $p->set($field->name, $field->value); } $p->save(); //create the page echo "<p>Page saved.</p>"; } } else { echo $form->render(); }
  3. I have pages with normal PW fields and a Google Map Marker field. I need to allow users to login in the front-end (custom login form) and update a page that is linked to the user's profile. Is it recommended or possible to embed the form for a PW page into the front-end? Should I add a user-field to the pages to define which users are allowed to edit it or is there some better way? All best-practices advise is appreciated!
  4. Hello all, I've come up with the following code to allow a user to update their profile information from the front end. It's part of some code that will allow them to edit other content too. I've decided to use URL Segments to help determine the page they are trying to edit, as well as their name etc. So this piece of code will basically allow them to update their Display Name. I just now need to add a piece of code to save the updated data back to the user profile fields etc. The code works as I would expect, and I know there will be more efficient ways of going about this, but this is easy for me to read as it is. So I'm basically here to ask whether or not this is an ok way to go about things? Is it secure? Can you see any major issues? Obviously I will add more profile fields etc, like e-mail, avatar pic, sex etc. I guess I'm just lacking a bit of confidence on the security front. I don't want users to have their profile info hacked from my sloppy coding etc <?php if($_POST['submit']) { echo "Form was submitted."; $new_display_name = $sanitizer->text($input->post->displayname); // The code to save the updated info for the profile will go here. } // Make sure the user has permission before showing the page to edit. if($user->hasPermission("edit_content")) { $edit_page = $input->urlSegment1; // The user is trying to edit their profile. if($edit_page == "profile") { if($user->name == $input->urlSegment2 or $user->isSuperuser()){ $user_display_name = $user->user_display_name; ?> <form action='./' method='post'> <div class="row"> <div class="large-12 columns"> <label>Display Name <input type="text" maxlength="26" name="displayname" value="<?php echo $user_display_name; ?>" /> </label> </div> </div> <div class="row"> <div class="large-12 columns"> <button type="submit" name="submit" value="Send">Update Profile</button> </div> </div> </form> <?php } else { echo "You cannot edit this profile."; } } elseif($edit_page == "link") { echo "You are editing the following link page: " . $input->urlSegment2; } } else { echo "You do not have permission to edit content."; } Thanks in advance.
  5. Hello, I have a frontend contact form with datepicker and need to have the german localization for it. I read about localization of datepicker on the jQuery Ui API page. How can I implement this in PW? I'm using FormBuilder module My form is loading these assets: InputfieldDatetime.js JqueryCore.js JqueryUI.js I rolled a custom UI theme and amended the js to have German language for datepicker. Now when I load that js file on top of the above mentioned, nothing changes. So I guess, the standard PW datepicker options do net get overridden by my custom theme js. In this thread apeisa says How would I go about it? Thank you gerhard PS: and sorry for doubleposting. I thought I explain my situation a bit more in this new thread.
  6. I want my site to have front end users able to register. Question: How should I handle registration information that is unvalidated? My idea was to make a sub group of pages called unvalidated users, and once they validate move them to validated users. Or I could name them unvalidated_username, and then rename it Or I could have a field checkbox for validatation. I guess in each of these scenarios, there would need to be some cleanup work... if a user stays unvalidated for x many weeks, delete the page? How would you do this. I expect to have thousands of front end users so I don't want to do anything manually. And yes, this is my first time building a custom dynamic website of any sort, so I have no prior experience with handling unvalidated users. Many thanks, aloha.
  7. I was wondering why that is and how I would alternatively show the user name on the frontend on a "created by"- or "modified by"-notice without showing only the db-key-like $user->name. I know I could create a custom user template and manually connect it somehow with the user name, but perhaps there is something I am missing.
×
×
  • Create New...