Jump to content

Search the Community

Showing results for tags 'frontend'.



More search options

  • 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
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Categories

There are no results to display.


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

Found 27 results

  1. When saving a page with the "order" template in the backend IftRunner is nice to me and sends the order via page action into my accounting software. When saving "order" in a frontend page it does nothing. So i certainly missing something . Any ideas?
  2. ProcessWire is setting a "wires" cookie for each guest session. Is it possible drop that cookies, so there are no cookies at all for guests? That way, I don't need to spam the user with a cookie consent box. I don't need cookies for user preferences and marketing purposes. (Why are cookies being set by default in the first place?)
  3. Reference: PW 3.0.111 and uikit3 based site using the Regular-Master profile. Despite my searches of the forum I'm somewhat confused about how to create new child pages on the frontend when a user clicks on a button on the parent page. I also have an equivalent button that is intended for uploading a .csv file to automatically create multiple new pages. This basically relates to a club (parent) and members (child) template configuration. Hopefully this explanation makes sense. A button should be able to launch the code needed to initiate the script required to create a new page using something like: <a href="/path/page.php">New +</a> <a href="/path/page.php">New ++</a> Does the code to create the new page or new pages need to be run from the template file for the child or the parent? A new individual member page will need to be editable manually at the point of page creation as well as subsequently, whereas multiple new pages will need to be editable after they have created and populated with data, again, as well as subsequently. I would very grateful for any advice or pointers as to how to achieve this.
  4. Reference: PW 3.0.111 and uikit3 based site using the Regular-Master profile. I've setup a page where a member can edit contact details via the frontend displaying the field content using the <edit> ... </edit> tags. This works fine when the fields actually contain data. However fields that contain no data (i.e. empty) do not appear to be editable. No edit cursor appears (- possibly owing to the field width being 0px?) Is the only solution to recreate the page using a form, for example, or is there a simple way to allow blank fields to be editable on the frontend? I wondered if anyone else has found a solution to this problem. Any assistance would be appreciated.
  5. Hi all, This is my first foray into a multi lingual PW site, what i'm unsre about is whether the frontend output is translated automatically or do I have to provide the content in another language also? As it stands I have installed the following modules: And have created and uploaded the Chinese language pack. At this point I can successfully change my profile and the backend successfully displays in Chinese. However I am confused about how I now get that translation to work on the frontend? I have setup the alternative url for the page I wish to view in Chinese So as a basic test I tried adding the following into the template used for the page above. However both urls still display the message in English? I take it I have missed something, do I then need to enter the frontend output in Chinese in another field within the backend to enable Chinese url to output the content? Any ideas would be greatly appreciated.
  6. Sure this has been asked a million times but cant find a simple answer. Trying to set the page to redirect to after login in the front end - i.e. not on the admin login page. some reason this works for super users but not normal users redirecting to a page which is viewable by members not guest role users. $showLoginError = false; if($input->post->user && $input->post->pass) { $username = $sanitizer->username($input->post->user); $pass = $input->post->pass; try { $session->login($username, $pass); // redirect user $session->redirect("/events/"); } catch (\Exception $e) { $showLoginError = true; } }
  7. 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.
  8. I've been trying to work out how I can provide a frontend file upload (whatever file format the user chooses to upload - albeit not executables!) for registered users to be able to create pages/posts and upload any file they wish so they can create a link to the file so it can either be downloaded or displayed. Everything I've read so far appears to relate to just images and uploading and adding images is already covered using the images field. Any thoughts/guidance would be a appreciated.
  9. This module hooks into the login method to provide the possibility to login with the user's email address. This is my first module and it's very simple. Please provide feedback if you have any suggestions. Thanks The module can be found in the module repository: https://modules.processwire.com/modules/login-with-email/ or on github: https://github.com/noelboss/LoginWithEmail
  10. I'm building an upload form for user to add images to a page. I would like for the user to change the image order after they add the images. Basically how the image field in the backend works. So users can drag and drop the image order. The problem is that I don't know how to rearrange the data of my image field based on the order a user submits?
  11. Hi, how do I enable frontend editing for repeater fields? It partially works with foreach($page->repeater_field as $item) { >? <li><edit list_item><?= $item->list_item ?></edit></li> <?php } But if I click a frontend item the text disappears. I'm not sure if this is a bug or because it does not know which text it should reference. I tried with: foreach($page->repeater_field as $item) { >? <li><edit list_item_repeater<?= $item->id ?>><?= $item->list_item ?></edit></li> <?php } But that results in an exception.
  12. Hello everyone, I need to rewrite entire application and I want to choose PW for speed reason and logic. I love the roles/permissions system and relationships in db, but now the question.. My app is based on users roles, foreach user role I need to write a big form (around 30fields)->store in database->edit and show the form. Simple crud system in frontend. I can not find a guide to do this, I would use as much as possible the PW's API can you give me some advice? edit: this module works fine! http://modules.processwire.com/modules/form-template-processor/ @ryan with the upload fields the page say "The page must be saved" my code in my template is: $form = $modules->get('FormTemplateProcessor'); $form->template = $templates->get('my_template'); $form->requiredFields = array('field1', 'field2', 'field3'); $form->parent = $page; echo $form->render(); Thank you all guys!
  13. I can't tell what's wrong; my local development version appears just fine, but I copy over the site files and db online and the homepage content is not being contained. See mad-web.agency. This is what it should look like (same site in the same browser, running on my localhost): http://imgur.com/UFZFzrd What could be the problem here? Sorry to bring up something so irrelevant to PW here, I just know that you all are a valiant and helpful group, and no one on StackExchange seems to even know what I'm talking about. Thanks a lot.
  14. Hello Forum, I am relatively new to processwire and have been playing around with some simple websites so far with it. I love the simplicity and the straight forward approach to it. I felt "at home" right away! =D The only thing, I just can not get done is implementing a simple post-form in a template. (front-end) I want to get registered users to create content via a simple form. Yes, there are several tutorials in this forum. BUT: I want the file upload to look like the upload in the back-end: - multiple upload - rearrange order of files Is that hard to build? It should be "there"... or do i need to install a module like https://processwire.com/talk/topic/12050-module-jquery-file-upload/ I would like to build it with core functionality. What do you guys think? Can you point me into the right direction? Cheers Stephan
  15. Dear ProcessWire buddies, I am on a tight schedule and I don't have a lot of time for research, so I hope any of you already had a similar case. I have a form and form data will be saved as a new page. How would you go about implementing a nice ajax video upload (with upload progress) on frontend and then adding this video to appropriate page. Besides that, I would need a video playback in cms. For frontend, I guess the fastest would be to use some library -> what is ProcessWire using for it's ajax file upload? Is it reasonable to use this in frontend as well? I have no idea how to make a video player in cms. Probably with a custom field type, that would then render a html5 video element if video is present. Is there any documentation on creating something like that? I hope you will be able to help me, Thank you all!!
  16. Hello. I need to create a page select type of field in a frontend Form The form is created using API: $formJob = $modules->get("InputfieldForm"); $formJob->method = "post"; ... And each field is created and added to the main form Object using corresponding Inputfield(X) module $field = $modules->get("InputfieldText"); $field->placeholder='NAME'; $field->attr('id+name','name'); $field->required = 1; $field->maxlength = 150; $formJob->append($field); The question is: How can I use the PageAutocomplete module in my form? I have tried adding a field as in the previous example: $field = $this->modules->get("InputfieldPageAutocomplete"); And setting the corresponding variables. Even included some JS files from Core: wire/modules/JqueryCore/jqueryCore.js ,wire/modules/JqueryUI/JqueryUI.js and the module JS file itself. But nothing happens, no ajax call, no jquery UI initialization, nothing. It is possible to use this inputfield outside the admin area/backend? Any help is appreciated.
  17. Hello, I am building a frontend form following Soma's great example on a PW 2.7.2 stable install. The pages that I edit with the form already exist. My form includes a single image field, CKEditor fields and some normal text fields. The form renders fine, all CSS and JS is in place. I can even use the pwImage plugin on the CKEditor field and it loads the image from that page. When there already is an image present in the image field and I submit the form, I get this error: Fatal error: Exception: Method Pageimage::path does not exist or is not callable in this context (in /var/www/utgpwnew/wire/core/Wire.php line 358) #0 [internal function]: Wire->___callUnknown('path', Array) #1 /var/www/utgpwnew/wire/core/Wire.php(398): call_user_func_array(Array, Array) #2 /var/www/utgpwnew/wire/core/Wire.php(333): Wire->runHooks('callUnknown', Array) #3 /var/www/utgpwnew/wire/core/Wire.php(337): Wire->__call('callUnknown', Array) #4 /var/www/utgpwnew/wire/core/Wire.php(337): Pageimage->callUnknown('path', Array) #5 /var/www/utgpwnew/wire/modules/Fieldtype/FieldtypeFile.module(119): Wire->__call('path', Array) #6 /var/www/utgpwnew/wire/modules/Fieldtype/FieldtypeFile.module(119): Pageimage->path() #7 /var/www/utgpwnew/wire/core/Wire.php(459): FieldtypeFile->hookProcessInput(Object(HookEvent)) #8 /var/www/utgpwnew/wire/core/Wire.php(333): Wire->runHooks('processInput', Array) #9 /var/www/utgpwnew/wire/core/InputfieldWrapper.php(636): Wire->__call('processInput', Array) #10 /var/www/utgpwnew/wire/core/Inp in /var/www/utgpwnew/index.php on line 248 If the image field is empty, I get this error on submit Fatal error: Call to a member function path() on a non-object in /var/www/utgpwnew/wire/modules/Fieldtype/FieldtypeFile.module on line 119 If I change the image field to hold more than one image, I don't get the error and the form submits fine with and without one or more images in the field From debugging I see that the error is triggered from $form->processInput($this->input->post); So the code does not work on single image fields. Is there a way to fix this? Any help would be much appreciated.
  18. I know how to create pages with the API. I need help with the form itself. Here's what I'm working with so far, hacked together from examples found in this forum: <?php $upload_path = $config->uploadTmpDir; $out = ''; // create a new form field (also field wrapper) $form = $modules->get("InputfieldForm"); $form->action = "./"; $form->method = "post"; $form->attr("id+name",'upload-form'); // create file field $field = $modules->get("InputfieldFile"); $field->label = "Audio File"; $field->attr('id+name','audio'); $field->description = "Upload your track(s)"; $field->destinationPath = $upload_path; $field->extensions = "mp3"; $field->maxFiles = 10; $field->maxFilesize = 2*1024*1024; // 5mb $field->required = 1; $form->append($field); // append the field // oh a submit button! $submit = $modules->get("InputfieldSubmit"); $submit->attr("value","Upload"); $submit->attr("id+name","submit"); $form->append($submit); // form was submitted so we process the form if($input->post->submit) { // user submitted the form, process it and check for errors $form->processInput($input->post); if($form->getErrors()) { // the form is processed and populated // but contains errors $out .= $form->render(); } else { // do with the form what you like, create and save it as page // or send emails. to get the values you can use // $email = $form->get("email")->value; // $name = $form->get("name")->value; // $pass = $form->get("pass")->value; // // to sanitize input // $name = $sanitizer->text($input->post->name); // $email = $sanitizer->email($form->get("email")->value); $out .= "<p>You submission was completed! Thanks for your time."; } } else { // render out form without processing $out .= $form->render(); } $content .= $out; That outputs the form but I can't drag & drop or input more than one file, and when I submit it says "Missing required value". I need to at least create one or more pages from the form submission, i.e., one per file uploaded. If possible I'd like to be able to set the title and description for each file/page as well.
  19. Hi, I need a frontend form with an repeater field (single text field with user input). After the form is submitted it will generate a new page, save it and than fill all the additional fields (works fine with images). But during add an item repeater says: Is there another way to build an "repeater field" used in a frontend form? Is there a solution to get it work?
  20. Hello all, I have a frontend form with a CKEditor textarea and an image upload field. The image upload is working fine. But when I want to insert an image through the PWimage plugin, I get an error inside the modal window This is happening on a page that has already been saved after adding the image. A forum search for that error revealed only this post and it's related post. Nut they don't seem to offer a solution to my problem. Line 179 in ProcessPageEditImageSelect.module says $images = $this->getImages($this->page); I'm not a coder, but I guess this means that $this->page returns a nullpage and thus the error. I read quite a few posts about frontend image handling but didn't find anything related to my problem here. Is it not possible to use the PWimage plugin on frontend forms? Or could this be related to permission settings for my frontend user? EDIT: I changed the title of this post from "CKEditor..." to "PWimage plugin...", because the problem is not CKEditor specific, it seems.
  21. 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!
  22. 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(); }
  23. 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!
  24. 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.
  25. 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.
×
×
  • Create New...