Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by karian

  1. I develop a website for a client and we use the FormBuilder plugin for hundreds of candidatures. https://regionale.org/ The client complains that the size is wrong when a FormBuilderFile field file size is rendered in the email : Hi Karian Unfortunately I already received worried e-mails from applicants who understand that 1,258 kB is a small number… My question is: can we change it to mega-byte (MB) and if not, could you instead change it from 2,000 to 2’000 → so that the thousand separator is up and not down? Here is my email template : <?php /** * This is the email template used by the 'Email administrators' feature in Form Builder * * CUSTOMIZE * ========= * To customize this email, copy this file to /site/templates/FormBuilder/email-administrator.php and modify it as needed. * It's preferable to do this so that your email template doesn't get overwritten during FormBuilder upgrades. * Inline styles are recommended in the markup since not all email clients will use <style></style> declarations. * * VARIABLES * ========= * @var array $values This is an array of all submitted field values with ('field name' => 'field value') where the 'field value' is ready for output. * @var array $labels This is an array of all field labels with ('field name' => 'field label') where the 'field label' is ready for output. * @var array $formData Raw form data array, which is the same as $values but unformatted and with additional properties like 'entryID' and '_savePage' id. * @var InputfieldForm $form Containing the entire form if you want grab anything else from it. * * */ if(!defined("PROCESSWIRE")) die(); ?><!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title><?php echo $form->name; ?> email</title> </head> <body> <table style='width: 100%; border-bottom: 1px solid #ccc;' cellspacing='0'> <?php foreach($values as $name => $value): ?> <tr> <th class='label' style='width: 30%; text-align: right; font-weight: bold; padding: 10px 10px 10px 0; vertical-align: top; border-top: 1px solid #ccc;'> <?php echo $labels[$name]; ?> </th> <td class='value' style='width: 70%; padding: 10px 0 10px 0; border-top: 1px solid #ccc;'> <?php echo $value; ?> </td> </tr> <?php endforeach; ?> </table> <p><small><?php echo __('Sent at'); ?> &bull; <?php echo date('Y/m/d g:ia'); ?></small></p> </body> </html> If someone has a solution for this issue, that would be awesome !
  2. Thanks @horst ! Sending a copy or using the bcc header is actually a good solution. I'll explore this way.
  3. After all that, I still don't understand how the "https://www.../form-builder/?view_file=..." form builder url could end up being referenced by Google. It's an url generated by form builder, so it can't be crawled by Google bots (even in the situation in which "Files Path" is not configured correctly with a private folder)...
  4. Solved it by changing the hash functions in site/modules/FormBuilder/FormBuilderMain.php, thus invalidating old urls from working. A configuration for this hash could be exposed directly from the admin, useful to reset access to hundreds of files without erasing them.
  5. I realized we still need this form-builder special url access to share files among the team and non-admin members. A good solution would be the possibility to change the auto-generated url suffix (sequence of letters and numbers)... Looking into it.
  6. People are still complaining about access from url "https://www.../form-builder/?view_file=...". Is it possible to protect this url for admin only viewing ?
  7. Hi everyone, Sending emails with WireMailSmtp works well but I would like to reflect sent emails on the email server "Sent" folder. Similar as what's discussed here. Someone mentions using imap_append ... Does anyone have a solution for WireMailSmtp?
  8. @fliwire thanks. I found the problem, my "form uploaded files" folder was not configured properly. As said in the form-builder plugin settings, the folder should start with a dot to ensure it's not http accessible (see image).
  9. Hi, One of our clients, an art fair, uses the formbuilder plugin to gather applications from artists. Artists fill a form with a pdf of their work in order to apply. As one of the artists complained, the problem is that their file (managed by the formbuilder plugin) is public and referenced by Google. The url looks like "https://www.../form-builder/?view_file=...". Is there a way to protect the file or a least prevent it being referenced by Google ? Thanks !
  10. Saving only 200 items with the method in the previous post takes several minutes in production. How do we optimize this and where is the repeater api reference page ? Someone has a clue ?
  11. Hi everyone, I have a repeater inside a repeater (two nested levels). These repeaters are populated via the api. $page->of(false); for ($x = 0; $x <= 10; $x++) { // first level repeater item $repeaterItem = $page->repeater->getNew(); for ($y = 0; $y <= 10; $y++) { // second level repeater item $nestedRepeaterItem = $repeaterItem->nestedRepeater->getNew(); // edit item $nestedRepeaterItem->someField = "some datas"; // save item $repeaterItem->save(); // $nestedRepeaterItem->save(); // $repeaterItem->nestedRepeater->add($nestedRepeaterItem); } // save item $repeaterItem->save(); // $page->repeater->add($repeaterItem); } // save page $version->save(); To obtain the expected result, I oddly had to use this command (twice) : $repeaterItem->save(); Commented lines are what I thought would be right, but if I do I end up with several times the same repeater items. @Soma your example suggest: ... $item->save(); // add the repeater item to the page $mypage->teasers->add($item); ... But it didn't work in the nested situation above, any idea why ? The only answer I see is that ->getNew() takes care of adding the item inside the repeater (maybe a recent addition to the api). Cheers
  12. I don't know why multiple instances (repeater_repeat_columns1, repeater_repeat_columns2, ...) of my repeater field are displayed inside Template field (see image). Is there a way to clean/reset it ?
  13. Hi, based on the work of @microcipcip and @gebeer (see their posts here and here), I put together a Processwire + React boilerplate (profile). Github repo: https://github.com/lapico/process-react Cheers, K
  • Create New...