Jump to content

Search the Community

Showing results for tags 'formbuilder'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







  1. Sorry for asking this question here, but I cannot ask it in the VIP section because I use an version of FormBuilder that is expired. I have a fairly simple form on a website done with FormBuilder (PW 3.0.148, FormBuilder 0.2.4) that seems to work quite well. I've tested it with Firefox (88.0.1), Chrome, Opera, Edge and it works in all browsers as expected. The form is embedded in the page by pasting the name of the form in the body field. Now my customer tells me, that her Firefox (88.0.1) is blocking the page where the form is embedded: "Firefox may not open this page" for safety reasons. I have no clue as to what seems to be the problem here, since the form is on the same server and has the same domain.
  2. Hi! I am trying to create a hook that takes the value of a form file field, and add it to an image gallery of an existing page. $forms->addHookBefore('FormBuilderProcessor::processInputDone', function($e) { $form = $e->arguments(0); if($form->name == 'new-inuse') { // related_font is a page selector $font = $form->getChildByName('related_font'); // getting the page name $fontName = $font->attr('value')->name; // finds the page from its name $fontPage = wire('pages')->find("name=$fontName"); // in_use_image is a file upload field $image = $form->getChildByName('in_use_image'); // trying to add the image to the existing image gallery in_use field $fontPage->in_use->add('$image'); // error here $fontPage->save(); } }); This outputs the following error: `Call to a member function add() on null`. Any idea what’s wrong with my code?
  3. I'm thinking of buying FormBuider, but first i want to know if i can use it for my needs. I checked the features of FormBuilder and found these: Send an auto-responder Conditionally email form submission to different people based on field values Display a success message, redirect to another URL or pull text from another page to display after form submission but i want to know, if its possible combine these to: redirect to a page that displays content based on (different) fields values just submitted from the form? or auto-respond a email based on the field values. example: if $formfield1="elephant" -> echo "your choice was an animal" if $formfield2="blue" -> echo "you selected a blue elephant" ... Thanks
  4. Hi all, Running into an odd error that I can't seem to get my head around. We have 2 separately created Formbuilder forms sitting on a single page. But we keep experiencing weird results with them, originally we couldn't get one of the forms to ever submit so we ended up disabling CSRF for them which let us get around this issue. However it then causes a problem in that with CSRF disabled, one of forms always records 2 entries on submission. Just a straight duplicate within the entries for that form. So trying to stop this happening we tried enabling CSRF again and although that does stop the duplicated entry, it ends up giving really weird feedback such as the attached screengrab. Hazarding a guess I assume whatever is trigger on submission is firing twice because of the presence of the second form, but I have no idea why this would be the case as they are 2 seperately named forms? Any ideas?
  5. Hi all, I have the same form on multiple pages, the idea being that I can populated a hidden field with a page specific value automatically. I figured this should be reasonably straight forward but I can't seem to get the following to take effect. <?php echo $forms->embed ('my-form-name', array('hidden_field_name' => '666')); ?> No matter what I do, it never updates the default value currently set for said hidden field. Feels like I'm missing something really obvious? Any ideas?
  6. I have a a form in my site footer that can be accessed anywhere on site, I've added the form in the _inc.php file and added the render in the pages footer.php. However, this works well on the homepage e.g. you can submit said form and get a thank you on reload, doesnt work at all on other pages... Just lots like a fresh reload. Any thing im doing wrong here or ways to diagnose as there isn't an error log for formbuilder etc...?
  7. Hi, I hope, this is the right place for questions about the Formbuilder (I couldn't find in the ProField support a subsection for the Formbuilder). A client needs for his website a random generator of a code (as winning numbers). This generator should be placed in a simple form (name and email) and a random generated code should be visible there. This code, or winning number, must be stored in the db together with the name and email. And the participant must receive a confirmation email with this code. I know, that the Formbuilder can store and send data to the user. But what about a random generated code? Is this a hook job? I found this module: http://modules.processwire.com/modules/process-field-generator/ but it's not for PW 3.
  8. Hi folks. I'm building a Formbuilder form to create new advert pages in a marketplace. Formbuilder is ideal for this. I need to add a description field that allows text to be added with line breaks etc. so showing a CKEditor field would be ideal (i.e. exactly like the field I'm typing into right now)!. Does anyone know if it's possible to add a CKEditor field to the front end presentation fo a Formbuilder field, maybe via a module or such? Many thanks!
  9. I have a few web forms which require testing on a weekly basis and I don't want the recipients (administrators) to receive these test emails. What would be a good way to test approx 15 forms from the front end and have the test delivered a list of secondary administrator recipients? I'm thinking that I could have some kind of config file which watches for a trigger word or email and then understands that it's a test and to bypass the normal admins? All of the forms ask for an email address so I could setup an email such as 'testform@email.not' etc which my config file (hook?) would watch for. Or is there a better way to do this? Additionally, I have a few extra requirements... Forms should goto an alternative success page. This is because I don't want my test to skew my Google Analytics conversion tracking Forms would need to be tested from the front-end and not the PW admin area Any advice appreciated. BTW I realise this should be posted in the proper FormBuilder support forum. I am in the process of renewing my license for access to that support forum.
  10. Hi, My name is Chris, i have been using Processwire for several months. I had the opportunity to create several sites with this one. Despite being great tool, I often encounter the same problem in the administration. I am continually disconnected (logout) for no specific reason. It's every time: after a page change. Ex: I send a form or simply a page change via a link. I checked the logs, messages, etc. but there is nothing related to this problem. Thank you for your support 🙂
  11. We're looking for someone who can make an addon for our website using Formbuilder and publishing the pages to a Google Calendar instantly. The use is a setup for laser reservations for a modelbuilding lab, see www.mekano.info to have a bit of an idea. On the 'calendar' page you'll find a linked Google calendar that lists all events per day. These events are now all added by staff members in a shared Google calendar. Underneath the calendar is a list of recent use of our lasercutters, generated by a form where user, machine and start time are entered and duration is calculated by editing that form. I have a likely form to add a reservation to enter user, machine and time/date but we want them to go into our shared Google calendar 'immediately'. If you look at early June in the calendar you can see how it should look like. I know there are simple solutions to make this happen but haven't figured a working out. We want Google calendar so all our staff can subscribe and see the calendar on all their devices. On the other hand we want to keep a list of students who made reservations because at some point they are limited. If you're interested I can give you a login to see a bit more behind the curtains. Part of the website is public for students and guests, quite a few functional pages are only visible when you're logged in.
  12. Hey guys, I'm using Form builder module by Ryan and I'm trying to render HTML success message after form is sent using value from this field: but it renders exactly as it is written in the field, not as HTML. To render it I just use echo <?= $successMessage ?> What am I missing? Thanks for any help. 🧒
  13. What is the best practice for having a form (only accessible to a logged in user) save the user's progress between sections of the form? Fieldsets? Multiple forms? Use case: I have a very long application form that would take 30 minutes for the applicant to fill out and I would hate for all progress to be lost due to user error. The progress needs to be logged into the user's page. Thanks!
  14. To create a new gitlab issue, I'd like to send an Email to the following email address using FormBuilder: incoming+account/repository@incoming.gitlab.com unfortunately, the / in the email gets striped by the sanitizer: wire('sanitizer')->email(incoming+account/repository@incoming.gitlab.com'); // output: incoming+accountrepository@incoming.gitlab.com Is there any way to configure the sanitizer? Any other Ideas how to send the mail to this address? Ps.: I can not define the email format as it is defined by gitlab. The format is also kind of "common" and known as email-alias in the form of emailaccount+alias@domain.com – gmail uses it to label mails… https://help.wodify.com/hc/en-us/articles/234441508-How-Do-I-Create-an-Email-Alias-
  15. Hi Guys, I wanted to start this thread to see what others are doing to make sure they are compliant with GDPR. Basically, a ton of websites are built on WordPress and I am seeing tons of plugins being rolled out to help with cookie compliance etc. Processwire however, doesn't have anything available. Also, if we are using FormBuilder, do we need an opt-in checkbox?
  16. Hi all, A few of our clients are having issues receiving emails sent via form builder after a client submits a form. They display fine in certain clients but in Outlook especially the body content is either missing or the raw code is displayed. Does anybody have any ideas why this might be the case or any ideas about how to diagnose the issue? Not sure if this is an issue with the emails themselves or the server from which they are being sent. Just wondering if anyone else has experienced anything similar?
  17. When I create a form with FormBuilder, is there a way to stop it from showing the vertical scroll bar on the right side of the form page??? For example look at this page. http://www.cji.edu/registration/reg-lemd/?course_name=Effective Report Writing&course_date=December 6, 2017 Why does it even have a scroll bar?
  18. Hello! I need your assistance please. I purchased the module FormBuilder. Unfortunately, the module discontinued delivering customer submissions to e-mail box specified in the module settings. Direct mailing to the e-mail box works OK. The module settings stays the same and are correct, like "Send e-mail to administrator(s) is checked. The last version of FormBuilder 3.0 has been installed. Please advise how to resolve the issue becase I cannot get orders from customers anymore (((
  19. The resume uploads fine, but everytime I try to access it, it says "this page is not intended for direct access". How would I make it so that link opens the file?
  20. I had situations come up that just seemed like AJAX was the right way to handle interactions with the ProcessWire server - pages with an element like a button or link that should cause an action to occur but shouldn't require a form or actually following a link - it should just take the action and only update the toggle (a checkbox in this case) when the interaction is completed. Another use case is with a large page on which there are multiple possible interactions. When the page is heavy enough that redrawing results in a less than optimal user experience then it's nice to be able to submit a form without having to redraw the page in order to update the relevant parts. So with that preamble, here's what I put together. I was going to try to clean it up a bit but that has prevented me from posting this so I figured it's better to post it and clean it up if there is any interest. You'll see references to the namespace whale - the name of our project - that would ultimately be removed. There are two major components - the PHP side and the client-side. On the PHP side there are two functional areas: 1. "wrapping" an entity to be inserted into the HTML on a page Wrapping (the function 'makeContainer()' puts a predefined wrapper around one of three types of objects: FormBuilderForm, InputfieldForm, or Template). The wrapper provides context and attaches classes that allows the client JavaScript code to find the wrapper and figure out what to do with it. // // define a function that makes a "form" of a single button. // function makeButton ($label) { // get the form $form = wire('modules')->get("InputfieldForm"); $form->attr('action', './'); $form->attr('method', 'post'); $submit = wire('modules')->get("InputfieldSubmit"); $submit->attr('id+name', 'submit'); $submit->attr('value', $label); $form->add($submit); return $form; } // wrapper function to set label on submit button function requestUserDeleteList() { return makeButton('Do it!'); } // // makeContainer wraps the rendered InputfieldForm in HTML so the client JavaScript can recognize it and handle // AJAX interactions with the server. // It returns the InputfieldForm object and the HTML to be inserted into the page. Note that makeContainer // is in a different namespace so it requires the function name must be qualified with the \ProcessWire prefix. // list ($form, $deleteUsersHTML) = ajax\Request::makeContainer('do-something', '\ProcessWire\requestUserDeleteList'); 2. helping with the processing of an AJAX request that is submitted to the page. Helping with the AJAX request - the code is invoked on page load and determines where there is a valid AJAX request from something it wrapped. It also allows messages to be returned, classes to be added or removed from specific elements, redirects to be executed, or even wholesale replacement of DOM elements (with plenty of caveats). It will even update a submit key so it is possible for the client to execute a single transaction multiple times. // get a new request object for the AJAX transaction $request = new ajax\Request(); // if it isn't formatted correctly handle the error if (!$request->isValidCall()) { return $request->echoError(); } // get the data and function-specific contents (Whale Ajax Context) $data = $request->data(); $wac = wireDecodeJSON($data['wac']); // if ($request->id('wants-newsletter')) { if (!ajax\Request::hasCorrectProperties($data, ['wac', 'value'])) { return $request->echoError(__('invalid call')); } // implement function here } else if ($request->id('another-function')) { // implement function here } // it didn't match any of the AJAX IDs implemented return $request->echoError('not implemented'); The client code requires jQuery and is packaged as three separate functions because both the form and template processing share a common core set of functions. My original intent was to only load the form or non-form code as needed but they're small enough that it really doesn't matter. See attachments for the Request class and the client code. There are many helper functions. Here is a kind of an unfocused extract that illustrates using the code with more context (from an internal sandbox page): <?php namespace ProcessWire; using whale\ajax; // include server-side code for making forms and processing them require_once './utility/ajaxform.inc'; // custom version of ProcessWire/wire/core/WireFileTools.php render() that returns the // template object, not the rendered HTML require_once './utility/get-file-template.inc'; // START AJAX submitted form processing - decodes the request and stores results in $aaform. $aaform = new ajax\Request(); // // this page handles multiple ajax calls so I check to see if it is valid once and then check IDs. // It's also possible to use $aaform->isValidCall('get-user-delete-list') to check specifically // for a specific AJAX ID. The ID is the name provided to Request::makeContainer() when the object // is wrapped. It's also possible to make calls to $aaform->id('get-user-delete-list') to check // for a specific ID. // // to create the forms/input elements that are submitted via AJAX start with: // Request::makeContainer('unique-name-on-page', object) // unique-name-on-page will become the ID of the element that wraps your object. // object - one of ProcessWire\InputfieldForm, \FormBuilderForm, ProcessWire\Template. // if ($aaform->isValidCall()) { if ($aaform->id() === 'get-user-delete-list') { $form = requestUserDeleteList(); // process using the form. the Request object will check to make sure it's the right type. if (!$aaform->process($form)) { return $aaform->echoError(); } // build new form with usernames for selections to delete. the function getUsersToDelete() // returns a user count and a function that will make the form that includes the users in // a list of checkboxes. list($usercount, $formmaker) = getUsersToDelete(); // this returns a replacement to part of the existing DOM. There are limitations but it // handles adding a form or replacing an existing form. if ($usercount === 0) { $replacement = '<div id="ajax-place">No users to delete</div>'; } else { // we pass the $formmaker function to makeContainer(). It returns the form and the // rendered wrapper and form. list($xform, $xhtml) = ajax\Request::makeContainer('do-delete', $formmaker); $replacement = '<div id="ajax-place">' . $xhtml . '</div>'; } // this makes sure the return is formatted so the client can handle it correctly. in // this case a replacement in the DOM is being returned. The first argument is the // selector, the second is the HTML to replace the selected element with. return $aaform->echoReplacement('#ajax-place', $replacement); } else if ($aaform->id() === 'do-delete') { list($usercount, $formmaker) = getUsersToDelete(); // process using the form returned by $formmaker. this will check to make sure it's // the right type of form. This abstracts FormBuilder forms and InputfieldForms. if (!$aaform->process($formmaker())) { return $aaform->echoError(); } // a bunch of logic where the checked users are deleted $deleted = []; $failed = []; $data = $aaform->data(); foreach($data as $name => $value) { if ($name === $value) { $user = wire('users')->get("name=$name"); $email = $user->email; // delete the user and try to get it again to see if the delete worked wire('users')->delete($user); $u = wire('users')->get("name=$name"); if (!count($u)) { $deleted[] = $email . " ($name)"; } else { $failed[] = $email . " ($name)"; } } } $deleted_users = $failed_deletions = ''; if ($deleted) { $deleted_users = 'deleted:<br/>' . join($deleted, '<br/>') . '<br/>'; } if ($failed) { $failed_deletions = 'failed to delete:<br/>' . join($failed, '<br/>') . '<br/>'; } $replacement = '<div id="ajax-place">' . $deleted_users . $failed_deletions . '</div>'; return $aaform->echoReplacement('#ajax-place', $replacement); } else if ($aaform->id() === 'contact') { // here a FormBuilderForm is being loaded if (!$aaform->process($forms->load('contact'))) { return $aaform->echoError(); } // this sends a notice back. the client will place it in a predefined notice area. // Request::makeContainer() will create an area for notices (or you can supply one). // It is also possible to return errors; notices and errors get different classes. $msg = ajax\Request::makeNotice('bruce says hi'); return $aaform->echoSuccess($msg); } else { // it was a valid form but it doesn't match any ID that this page knows about. return $aaform->echoError('what is this?'); } } // normal processing to render the initial page follows as it was not a valid AJAX post // that is handled by Request(). That's a lot of code, so I won't post anymore. If people have interest I'm happy to explain or provide other bits of code, like the extracted get-file-template.inc function. Wrapping a template is similar to wrapping a form except that only certain HTML elements are tracked and each are sent to the server when they are clicked on (technically it varies). It handles radio buttons, checkboxes, links, and buttons (radios and checkboxes on "change" and links and buttons on "click"). So when a checkbox is checked an AJAX call will be made so it can be acted upon by the server. @microcipcip, @ryan, @valan (sorry to any if this isn't interesting to you - I did a quick scan of what looked like semi-related AJAX posts). ajaxform.inc ajaxclient.js
  21. Hi there! I just bought the formbuilder module (which is really great, thanks Ryan!), I was wondering if it was possible to access in any template directly the entries without using the page creation option. In other words is it possible to have something like this: $forms->formtitle->fieldtitle I searched for it but I have to say I'm kind of feeling that there is missing a little technical introduction in the readmefile provied at the download. Thanks for the attention, and again, thanks Ryan for having build this, it's really useful for us and our clients!
  22. Hello, I am very happy user of Processwire, and I'm thinking to build a personal project. This project will have a lots of forms, so I was thinking to use Formbuilder to save time and also to support Ryan for his awesome work on Processwire. Its a like an team management system, where I can store information about users, teams, what team the belong, inventory, journal etc. If someone who has used Formbuilder can help me with this questions that would be great. Can I create custom listings of the form submissions? Can I create pages with this listings Build custom reports Manage permissions access of the forms, listing and reports Thank you
  23. Hi Guys, Here are two issues that took my quite the amount of effort to fix so here im sharing the answers with you. 1. Non-admin user can’t edit profile information using Fredi. I installed Fredi and I sort of got it to work since when logged into Admin i'm able to edit my profile information, when logged in as anyone else however I don't get the "Edit" button. Also showing just certain specified fields doesn't work. When i call Fredi using this syntax and I'm loggedin as Admin it shows me all the editable fields of the user profile, not just "zzp_profiel_naam". $username = $user->name; $another_page = $pages->find("parent=user, name={$username}")->first; echo $fredi->render("zzp_profiel_naam", $another_page); Also I was wondering if it is possible to embed the edit-fields Fredi shows me in a lightbox directly on a page without the lightbox. This would make handeling the updates a lot easier also since it won't have to open the lightbox again on submitting changes, and you won't have to close it again after doing so. SOLVED Instead in using FREDI I used to backend modal to do this, include it like this: <?php $page->setOutputFormatting(true); ?> <iframe src="/cms/profile/?modal=1" style="width:calc(100% - 300px); float:left; border: 2px solid #ccc; padding:0px 0px 0px 0px;" onload="resizeIframe(this)"> </iframe> I used this javascript to change the iframe height to the height of the dynamic content, you could maybe add a onchange listener to resize it every time the height of the content changes. <script language="javascript" type="text/javascript"> function resizeIframe(obj) { obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px'; } </script> A problem arose when trying to update single image fields, the modal added a second and left the first as it was. To remove the first when uploading a new one to a single image field add this to /site/ready.php // Make sure image upload into single image field deletes old image first $p = $page->process; $t = $page->template->name; if ("ProcessProfile" == $p && "admin" == $t) { $page->addHookBefore('InputfieldImage::fileAdded', function($event) { $u = wire('user'); $i = $u->place_your_image_field_name_here; while ($i->count() > 1) { $i->shift(); } }); } SOLVED Click here for the answer: https://processwire.com/talk/topic/10884-text-area-paragraphs-when-creating-a-page-from-a-form-submission/ 2. Line Breaks from Form Builder textarea not being transferred to the Rich Text Editor on the page it is saved to. What I need is for each textarea inside any form on the site to maintain it's line breaks like submitted by the user when transferred from entries to a page after being checked. The result in the form entries is what is is supposed to be, maintaining the line breaks. When transferred to a page however the breaks don't get transferred end I end up with one large block of non-breaking text. This is what me and some others have concocted to far. The upper part is working and sets a test message in the logs. The bottom one however is not. If I change the method to "saveForm" instead of "savePage" it does give me an error since afterwords I try to call objects that don't exist within the "saveForm" method, so I would assume it's getting called. // This is getting called and sets a test message in the Logs $forms->addHookAfter('FormBuilderProcessor::saveForm', function($event) { $processor = $event->object; $event->log->save('test', 'data=' . print_r($data, true)); $event->log->save('test', 'savePageFields=' . print_r($processor->savePageFields, true)); }); // This is not setting a log file, not even when I transfer the Form entry to a page $forms->addHookBefore('FormBuilderProcessor::savePage', function($event) { $processor = $event->object; $data = $event->arguments(0); foreach($processor->savePageFields as $fieldID => $name) { if(empty($data[$name])) continue; $field = $event->fields->get($fieldID); if(!$field || !$field instanceof FieldtypeTextarea) continue; $data[$name] = "<p>". str_replace("\n\n", "</p><p>", $data[$name]) . "</p>"; $data[$name] = str_replace("\n", "<br />", $data[$name]); $event->log->save('test', 'data=' . print_r($data, true)); $event->log->save('test', 'savePageFields=' . print_r($processor->savePageFields, true)); } $event->arguments(0, $data); }); If you can, please please please! Help me out, im really desperate and have been trying to fix these two problems for ages now Thanks in advance, Bram
  24. Hey Guys! I ran into some really strange behavior when trying to save selected Selectfieldtype values from a form to a select field in a page. I have three different dropdowns in this page, all with different values and they randomly get saved en sometimes they don't. This is my setup: Form Page: Dropdown a: Dropdown a: - - V - - - V - Dropdown b: Dropdown b: - - V - - - V - Dropdown c: Dropdown c: - -V - - - V - I have no idea what is causing this since it happens completely randomly, does anybody have any ideas? Like, would it make more sense to only use a text field on the page side to recieve the value? and if so, why? Thanks in advance Gr, Bram PS: In the screenshot you can see the three filters that pick up the dropdown values and show the entries that are equal to the filter. And you can see the dropped values in the submissions.
  25. Hey all, I'm brand new to processwire and have already fallen in love with it. Currently I'm building my first website with it and I need a way to style the form builder generated forms with CSS. I know it's possible to style them with the jQuery UI themeroller, but I need more direct control. I've looked through all the CSS files I thought could be related with the form, but I can't find how to add my custom styles via CSS. (I can't access the markup directly to do a hackathon because the forms are embedded via iframe.) Thanks in advance, Nick
  • Create New...