Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/20/2017 in all areas

  1. This week we've got a new version of ProcessWire 3.0.80. In this post we also look at how to create a language pack, and answer a lot of common questions about Pro module renewals, upgrades and more. Lastly, we take a brief look at the upcoming CKEditor 5. https://processwire.com/blog/posts/pw-3.0.80/
    13 points
  2. Some introduction... This module is experimental and there are probably bugs - so treat it as alpha and don't use it on production websites. I started on this module because there have been quite a few requests for "fake" or "invisible" parent functionality and I was curious about what is possible given that the idea sort of goes against the PW page structure philosophy. I'm not sure that I will use this module myself, just because I don't really see a long list of pages under Home (or anywhere else) as untidy or cluttered. I would tend to use Lister Pro when I want to see some set of pages as a self-contained group. But maybe others will find it useful. At the moment this module does not manipulate the breadcrumb menu in admin. So when you are editing or adding a virtual child the real location of the page is revealed in the breadcrumb menu. That's because I don't see the point in trying to comprehensively fool users about the real location of pages - I think it's better that they have some understanding of where the pages really are. But I'm open to feedback on this and it is possible to alter the breadcrumbs if there's a consensus that it would be better that way. Virtual Parents Allows pages in Page List to be grouped under a virtual parent. This module manipulates the page list and the flyout tree menu to make it appear that one or more pages are children of another page when in fact they are siblings of that page. Why would you do that instead of actually putting the child pages inside the parent? Mainly if you want to avoid adding the parent name as part of the URL. For example, suppose you have some pages that you want to be accessed at URLs directly off the site root: yourdomain.com/some-page/. But in the page list you want them to be appear under a parent for the sake of visual grouping or to declutter the page list under Home. Example of how the page structure actually is Example of how the page structure appears with Virtual Parents activated How it works This module identifies the virtual parents and virtual children by way of template. You define a single template as the virtual parent template and one or more templates as the virtual child templates. Anytime pages using the child template(s) are siblings of a page using the parent template, those child pages will appear as children of the virtual parent in the page list and tree menu. You will want to create dedicated templates for identifying virtual parents and virtual children and reserve them just for use with this module. Features Adjusts both page list and tree flyout menu to show the virtual parent/child structure, including the count of child pages. Works everywhere page list is used: Page List Select / Page List Select Multiple (and therefore CKEditor link dialog). Intercepts the "Add page" process in admin, so that when an attempt is made to add a child to a virtual parent, the child is added where it belongs (the next level up) and the template selection is limited to virtual child templates. Intercepts moving and sorting pages in the page list, to ensure only virtual children may be moved/sorted under the virtual parent. Superusers have a toggle switch at the bottom of the page list to easily disable/enable Virtual Parents in order to get a view of what the real page structure is. Usage Install the Virtual Parents module. In the module config, enter pairs of parent/child template names in the form virtual_parent_template=virtual_child_template. If needed you can specify multiple pipe-separated child templates: virtual_parent_template=child_template_1|child_template_2. One pair of template names per line. There is a checkbox in the module config to toggle Virtual Pages on and off, but it's more convenient to use this from the page list. Notes It's important to keep in mind the real location of the virtual child pages. This module is only concerned with adjusting the appearance of page list and tree menu for the sake of visual grouping and tidiness. In all other respects the virtual children are not children of the virtual parent at all. It's recommended to select an icon for the virtual parent template (Advanced tab) so virtual parents are marked out in the page list as being different from normal parent pages. Do not place real children under a virtual parent. There is some protection against this when moving pages in the page list, but when it comes to changing a page's parent via the Settings tab the only protection is common sense. https://github.com/Toutouwai/VirtualParents
    8 points
  3. Never considered Tracy as a she . But yeah, its a girl's name isn't it. I'm gonna call Tracy a `she` from now on.
    4 points
  4. Developing a website or whatever without Tracy is for masochists! Sorry I can't resist!
    4 points
  5. Hello, I just want to point out this framework for making html apps https://onsen.io/ it's compatible with jquery, angular, vue, react or any other js framework. So far I made an app using this and bootstrap with https://propeller.in/ for the desing and some libs like jquery and lodash for the app logic I prefer this to other alternatives like ionic since it does not bound you to angular or react. Cheers
    3 points
  6. Sorry if it seems like I am promoting Tracy here, but if you were using her, you could just do this in the Console panel and you'd instantly see if $user is an object and what the name of that user is.
    3 points
  7. Don't use div element in the document head, it's incorrect.. instead use this Processwire markup region option <pw-region id="title-region"> <title id="title-region"><?php echo $page->title; ?> | <?php echo $page->template->name; ?> | schildpad | Chrysemys</title> </pw-region> ... <pw-region id="google_map"></pw-region>
    3 points
  8. I don't think <DIV> elements are valid children of <HEAD>. Element names may be the same, but IDs should be unique.
    3 points
  9. To enable markdown, you have to install the following core module : ... then you have to apply the Textformatter to your field. Go to the Details tab of your field, select the Textformatter(s) you need then save. Did you mean you clicked/installed the Front-end page editor ? If yes, simply uninstall the module PageFrontEdit. You might need to remove some markup depending on the option you choosen. And welcome
    3 points
  10. Please try... wire('settings') Note the difference in quotation marks - the forum editor changes single quotes to curly quotes (at least, they look like it to me) Such quotes are not accepted as string markers in PHP, so if you copied-and-pasted directly from Macrura's reply, you would probably get an error like that.
    2 points
  11. o_O s t u n n e d to see what I have been missing by not using Tracy. THANK you again @adrian for the post and for Tracy!
    2 points
  12. Check $user with var_dump if it has the expected user. My guess is that you overwrite $user somewhere. Where do you have this code?
    2 points
  13. I don't have ProField here, you should test it now and report back
    2 points
  14. You need two fields. 1) Create a new field, call it ''altTitle' (but can be any name). NOTE: if you're copy/pasting then the name must be 'altTitle'. 2) On the field 'Input' tab. Set max length to 70 and add a 'character counter'. 3) Add this field to any templates that need an alternate title. So now, if you want just the 'title' field: <title><?php echo $page->title; ?></title> Or just the 'altTitle' field: <title><?php echo $page->altTitle; ?></title> The 'altTitle' field OR the 'title' (i.e. if the 'altTitle' is empty or not present on the template, then will just print value of 'title'): <title><?php echo $page->get("altTitle|title"); ?></title> The 'title' field with the 'altTitle' appended to it (if 'altTitle' exists on template): <title> <?php echo ($page->altTitle) ? $page->title . " - " . $page->altTitle : $page->title; ?> </title> Good luck
    2 points
  15. Yeah I use it at work, created this with it https://play.google.com/store/apps/details?id=com.interswitchng.ifisagent&hl=en It feels lighter to me than Ionic and faster, and yes it can be built with other frameworks. But TypeScript and NG2 isn't bad though
    2 points
  16. Another alternative to enforce arbitrary filesize limitation is using File API. This has the advantage of preventing file uploads before even they hit to the server, saving bandwidth and resources. Given a form like this <form> <p data-maxsize-message>Files larger than {MAX_SIZE} aren't allowed</p> <input type="file" name="uploadables" multiple><br> <div data-error-wrapper></div> <button type="submit" name="submit" value="submit">Submit</button> </form> You can check file sizes, show and error and prevent file uploads using something like this: const MAX_SIZE = 0.2e6; // bytes => ~0.2MB const MAX_SIZE_STR = '0.2MB'; const form = document.querySelector('form'); const fileInputs = form.querySelectorAll('[type=file]', form); const errorWrapper = form.querySelector('[data-error-wrapper]'); const submitButton = form.querySelector('[type=submit]'); const maxSizeMessage = form.querySelector('[data-maxsize-message]'); // Display max allowable file size maxSizeMessage.innerText = maxSizeMessage.innerText .replace('{MAX_SIZE}', MAX_SIZE_STR); // listen to all file inputs for new files [].slice.call(fileInputs) .forEach(inp => inp.addEventListener('change', handleFile)); function handleFile(e) { let files = [].slice.call(this.files); let largeFiles = files.filter(({size}) => size > MAX_SIZE); // if there are large files, show a message and prevent upload if (largeFiles.length) { let errors = largeFiles.map(({name, size}) => { return `${name} is larger than ${MAX_SIZE_STR}`; }); errorWrapper.innerText = errors.join('\n'); submitButton.disabled = true; // prevent upload by removing input name (restored with valid input) this.dataset.name = this.name; this.name = ''; } else { errorWrapper.innerText = ''; submitButton.removeAttribute('disabled'); // restore input names this.name = this.dataset.name; } } And here's a demo http://output.jsbin.com/lulopi/
    2 points
  17. Thanks all (@abdus and @horst) for the quick response. I'd be lost without this module, I use it on every site. Also thanks to @ryan for having the feature of saving the previous version of each module when using his Upgrade module.
    2 points
  18. The video fieldtype can do autoplay and loop - take a look at the Mediaelement API (https://github.com/mediaelement/mediaelement/blob/master/docs/api.md). You can also completely replace the video rendering code in the settings of the module with another player if you'd prefer. Not to say that a normal files field isn't fine, the Video fieldtype just makes it easier to manage videos in the backed because it creates images, shows the length of videos, and a few other things. Really depends on your needs as to what will be best.
    2 points
  19. Or if you want a solution for generating poster images and providing an easy play option, check out: https://github.com/adrianbj/FieldtypeVideo
    2 points
  20. You can add pages using page objects or page ids, but can only remove them using page objects. A bit inconsistent, to be honest. So you need to do $u->projectmanagers->remove($pages->get(1044)); From the core: // PageArray.php public function add($page) { // ... } else if(ctype_digit("$page")) { $page = $this->wire('pages')->get("id=$page"); if($page->id) { parent::add($page); $this->numTotal++; } } return $this; } public function remove($key) { // if a Page object has been passed, determine its key if($this->isValidItem($key)) { $key = $this->getItemKey($key); } if($this->has($key)) { parent::remove($key); $this->numTotal--; } return $this; } Edit: I created a feature request
    2 points
  21. MODULE PREVIEW This is a new module I'm working on, Settings Train. Ever needed to setup one or more pages for site settings, need a lot of fields/settings and an easy way to access them in the front end. This module may be of use to you. You can of course either make an editor page using standard fields for settings, but the goal of this module is to allow files within the template folder to define their own 'dependencies' for settings. Description: this module allows you to create an unlimited number of admin/process pages, and on any process page you can enter the path to a json file that defines the fields to use for the process page. 1.) Contents of kitchen-sink.json [ { "name":"text1", "label":"Text Field 1", "type":"InputfieldText", "width":"100", "description":"", "collapsed":0, "placeholder":"", "value":"", "columnWidth":50 }, { "name":"text2", "label":"Text Field 2", "type":"InputfieldText", "width":"100", "description":"", "collapsed":2, "placeholder":"", "value":"", "columnWidth":50 }, { "name":"select1", "label":"Select Test", "type":"InputfieldSelect", "width":"100", "description":"Description of select 1", "options": { "default":"Default", "blue":"Blue", "red":"Red", "yellow":"Yellow", "dark":"Dark" }, "collapsed":0, "placeholder":"", "value":"", "columnWidth":33 }, { "name":"checkbox1", "label":"Checkbox Test", "type":"InputfieldCheckbox", "width":"50", "description":"Checkbox 1 description", "collapsed":0, "placeholder":"", "value":1, "columnWidth":34 }, { "name":"radios1", "label":"Radios Test", "type":"InputfieldRadios", "width":"50", "description":"", "options":{ "black":"Black", "white":"White" }, "collapsed":0, "placeholder":"", "value":"black", "columnWidth":33 }, { "name":"checkboxes1", "label":"Checkboxes Test 1", "type":"InputfieldCheckboxes", "width":"50", "description":"Checkboxes 1 Description", "options":{ "address":"Address", "phone":"Phone", "social":"Social Icons", "top_menu":"Top Menu" }, "collapsed":0, "placeholder":"", "value":"", "columnWidth":50 }, { "name":"checboxes2", "label":"Checkboxes Test 1", "type":"InputfieldCheckboxes", "width":"50", "description":"Checkboxes 2 Description", "options":{ "address":"Address", "phone":"Phone", "social":"Social Icons", "top_menu":"Top Menu" }, "collapsed":0, "placeholder":"", "value":"", "columnWidth":50 }, { "name":"textarea1", "label":"Textarea Test", "type":"InputfieldTextarea", "width":"100", "description":"Textarea 1 Description", "collapsed":2, "value":"" }, { "name":"pagelistselect1", "label":"Page List Select Test", "type":"InputfieldPageListSelect", "width":"100", "description":"Page List Select Test Description", "collapsed":0, "value":"0", "columnWidth":50 }, { "name":"asm_select1", "label":"ASM Select Test", "type":"InputfieldAsmSelect", "width":"100", "description":"ASM Select (templates) - select a template.", "options":{ "43":"Image", "59":"Options", "61":"Post (post)", "62":"Post Index (post-index)" }, "collapsed":0, "value":"", "columnWidth":50 }, { "name":"url_test", "label":"URL Test", "type":"InputfieldURL", "width":"100", "description":"Enter a URL", "noRelative":1, "collapsed":0, "value":"", "columnWidth":33 }, { "name":"integer_test", "label":"Integer Test", "type":"InputfieldInteger", "width":"100", "description":"Enter an Integer", "collapsed":0, "value":"", "columnWidth":34 }, { "name":"email_test", "label":"Email Test", "type":"InputfieldEmail", "width":"100", "description":"Enter an Email Address", "collapsed":0, "value":"", "columnWidth":33 }, { "name":"ckeditor_test", "label":"CK Editor Test", "type":"InputfieldCKEditor", "width":"100", "description":"Some Formatted Text", "collapsed":0, "value":"" } ] The json file can be anywhere (currently limited to the templates folder). For example, if you have a theme folder and that theme requires specific preferences to be set for that theme, you can have the settings page load the fields needed by that theme. Process Page in Menu: Process Page (editing the settings): Then you can access those settings in your front end like this: $train = $modules->get("SettingsTrain"); $themeSettings = $train->getSettings('news-settings'); the settings are delivered as a WireArray: so you can now do this: echo $newSettings->url_test; which outputs http://processwire.com For rapid site development, this can save you from having to manually setup fields for new projects settings, especially if you use those same settings a lot.
    1 point
  22. sorry my phone kb doesn't have straight quotes?
    1 point
  23. Just a quick update to let you all know that: 1) With lots of help from @gmclelland we have been ticking off a lot of PHP 7.2 errors. Not sure that we have discovered them all yet though, so please let me know if you come across any. 2) I just forced the Validator panel to use the HTML5 version all the time. I was finding the other version wasn't working for some sites. Hopefully this won't cause any problems, but please let me know if you find anything amiss.
    1 point
  24. 1 point
  25. Actually @alan - I should note that in some instances using the Console panel for this purpose may not achieve what you are looking for. If your template had overridden $user somewhere you might be better off doing bd($user) or bd($user->name) just before that isLoggedin() check so you know you are getting the value that is being used right there in your code. You can do this in your code editor, or you can even do it in the Template Editor panel and use the "Test" button - that way no changes are even made to your template files, so no need to remove debug statements when you're done. Have a read here: https://processwire.com/blog/posts/introducing-tracy-debugger/#template-editor-panel
    1 point
  26. @theoretic - have you had a look at @Macrura's new module: https://processwire.com/talk/topic/17458-settings-train-module-preview-all-aboard/? Maybe this will take care of your needs?
    1 point
  27. If $x is a counter var, shouldn't it be $x = 0; // instead of empty string? ?
    1 point
  28. Thanks @Mustafa-Online - I was pretty certain it was good, now the worse bit, working out what else I have here that's causing this
    1 point
  29. @alan - Nothing wrong with ur code .. I tested It inside my "tempaltes/admin.php" - Works Fine
    1 point
  30. This: $a = $pages->find("template=yourtemplatename, field=fieldname"); should be matching a value for the field...not the field name itself... $a = $pages->find("template=yourtemplatename, fieldname=search_criteria"); If only saving the one field, it is more efficient to do: $b->save('fieldname');
    1 point
  31. More GoDaddy weirdness. Clicking many of the links within ProcessWire admin results in a 500 error. For example, Modules > Refresh does this as does the Upgrades link. The only way I can get the site to work again is to reimport a backed up database. I'm going to move this site asap but thought I'd add it to the list of reasons not to use this service.
    1 point
  32. <?php $a = $pages->find("template=yourtemplatename, fieldname=search_criteria"); foreach ($a as $b) { $b->title = "New Name Here"; $b->save('fieldname); } ?> Its untested, but this should do the trick (for updating a title). However, someone please chime in if I have missed something.
    1 point
  33. Wow! So cool @kongondo. Only just seen this, I am buried deep in vuejs these last weeks. Will definitely have a look when I am back into Processwire again.
    1 point
  34. try { $form->processInput($input->post); $session->CSRF->validate(); } catch (WireCSRFException $e) { echo "Processing aborted. Suspected attempt to forge the submission. IP logged." . $e->getMessage(); /* * Some code to execute whenever the token gets spoofed * Like sending a notification mail with the spoofer's IP address */ die(); // live a great life and die() gracefully. } or // when processing form (POST request), check to see if token is present if($session->CSRF->hasValidToken()) { // form submission is valid // okay to process } else { // form submission is NOT valid throw new WireException('CSRF check failed!'); }
    1 point
  35. Yeah, just change: <title><?php if($page->id > 1) { echo $page->title .' - '; } echo $home->title ?></title> to: <title><?php echo $page->title; ?></title> ...and from then on the title tag of each page will be exactly what you type in the 'Title' field with nothing more added to it.
    1 point
  36. Chrome has been officially updated to 62.0.3202.62 and now the problem is gone
    1 point
  37. @mke, there is a property and helper method in InputfieldFile that allows a maximum files size to be set but there is no config field for it in admin and you would need to set the max file size in a hook in /site/ready.php: $wire->addHookBefore('InputfieldFile::render', function(HookEvent $event) { /* @var InputfieldFile $inputfield */ $inputfield = $event->object; if($inputfield->hasField == 'YOUR_FIELD_NAME') { $inputfield->setMaxFilesize('2m'); // Set the max file size in bytes or use string like "30m", "2g" "500k" } }); Also, for some reason max file size settings of less than 2MB are not enforced - see here.
    1 point
  38. OK I tried this and it worked a charm. Thanks very much for your help... Simon
    1 point
  39. The code is in a template file. We can't tell you which one because you can set up processwire according to your own preferences. If it's a live site then the files will be on the server yes. Template files go in '/site/templates/' so you need to start by looking in that folder. You're only looking for the file that contains the code that ouputs the <head> section of your site, that's where the meta (and title) tags go. It might be '/site/templates/_main.php' or '/site/templates/header.php' or '/site/templates/includes/header.php/'. See the problem? We can't guess as there's not a 'correct' or single way to organize processwire. This is one reason why I use it over any other CMS I've tried. If you're willing to learn, then with your current skillset, I think you'd go further with processwire. However, of you mean 'nice websites' by copy/paste then wordpress would work better for you simply because there are 1000s of code examples.
    1 point
  40. Hey desbest, what version of processwire are you currently using? If you are using 3.x.x, you will probably need to incorporate <?php namespace ProcessWire; ?> into your template files. However, there might be a few other things needed as this profile was introduced 5 years ago and has been removed from the Site Profiles currently in the modules directory. There is though an updated version by @dadish that updates it to v3.x.x, and it can be found here.
    1 point
  41. I ended up going with Settings Factory, since it may just make more sense in the long run. The module is really more of a facilitator to the display of inputfields related to settings, and their subsequent storage and retrieval, so not sure there is any good metaphor that could be used...
    1 point
  42. You're a braver man than I. Good luck!
    1 point
  43. Update: Multi Sites Version 0.0.2. Multi Sites can now install single/stand-alone sites! The Multi Sites in the name now means installing and managing multiple sites ! For single sites use, the module now downloads, strips, compresses and save ProcessWire versions of your choice for reuse (rather than downloading each time you install a single site). These ProcessWire files can be refreshed on demand, e.g. when a new version of ProcessWire comes out. README is now complete. See changelog for more details. Download from GitHub. Changelog Support for installing single/stand-alone sites. Added Type or Paste and Install Configuration methods for creating sites. Create and edit site install configurations. Download, store and restore various versions of ProcessWire (for single-site installations). UI enhancements. I'll update first post later. Screens 1 2 3 4
    1 point
  44. @fbg13 Yes absolutely, just copypasted the previous post in case he was using the image field (and btw, the if condition do not make sense, thanks). But should be $form->login_submit->value as $form->login_submit return an object.
    1 point
  45. I think just $form->login_submit = "???"; should do it. $wire->addHookAfter('LoginRegister::buildLoginForm', function($event) { $form = $event->return; $form->description = false; $form->login_submit->value = "???"; $event->return = $form; });
    1 point
  46. @The Frayed Ends of Sanity: modify your hook with the following code : $wire->addHookAfter('LoginRegister::buildLoginForm', function($event) { $form = $event->return; $form->description = false; // Remove the description foreach ($form->children as $field) { // loop form fields if($field instanceof InputfieldSubmit) { // if we reach the submit button then $field->value = 'My Submit'; // change the value } } $event->return = $form; }); Just look at the source code, and learn ProcessWire's hooks. With a little more experience you will be able to find those tricks alone We are happy to help here dude
    1 point
  47. ProcessWire's database abstraction is the best of all CMS systems I know.
    1 point
  48. Bumped to 0.2.4-beta: Fixes schema changes (per ThePixelDeveloper's recent commits). Note that the sitemap doesn't render using the XML viewer, and it's still to be tested in Search Console. A few changes to ModuleConfig. Adding image fields to the sitemap is now only possible if your site contains image fields. Hook priority is changed (from after to before). This is mostly due to SystemNotifications showing a 404 for the sitemap.xml route. add X-SitemapRetrievedFromCache header for debugging purposes. PS, I'm working on a new docs site as well. It'll be powered by PW, and will have docs for all my modules. On a separate note: Jumplinks is on the mantleshelf for a little while as I'd like to do a refactor to make the code a little more 'lean' and my schedule is not what it once was. There are a few things bugging me with regards to the way it's put together at the moment, and it feels a little chunky. Sorry for the delay on that one, guys...
    1 point
  49. Bumped to 0.1.1-beta Added image support: You can now specify fields in module config that should be included when rendering the sitemap. Simply choose one or more image fields from the list, and any Page that uses those fields will have their images listed in the sitemap. If a description is present, it will be used as the image caption. Also supports ImageExtra. To add specific details to your sitemap's image entries, use ImageExtra to add the meta fields accordingly: Add a license field to set a license for the image (it must be a URL, or it won't be included) Add a title, if needed Add geo, location, or geolocation if you'd like to specify the geo-location of your images The template field in ModuleConfig was changed from includeTemplates to sitemap_include_templates. The ModuleConfig fields now show template and field labels, and not their names. Small changes to the per-Page config field descriptions and labels
    1 point
  50. Edit: The title of this post has been renamed to use the word "processor" instead of "builder" - this is not a form-building module. I'm currently putting together a simple developer-centric form processor for one of my projects, and have decided that I'd like to release it as a module as soon as it's stable enough. The idea is to separate it from the backend, and use per-form configuration files and templates instead. I could well implement a backend solution for this, but my preference is for it to be developer-centric. For me, this makes it easier to use and, of course, develop. Here's how it currently works: developer specifies forms and their particulars in a JSON file stored in the module's directory. The file includes dictations such as the name of the form, the fields it uses (along with their sanitization/validation rules), template information, and a set of emails to send when the form is being processed. An example of such configuration is: { "contact": { "name": "Contact Form", "fields": { "name": { "sanitize": "text", "rules": { "required": "Please enter your name." } }, "email": { "sanitize": "email", "rules": { "required": "We need to know your email address so we can get back to you.", "email": "That doesn't look like a valid email address." } }, "company": { "sanitize": "text", "rules": { "min(4)": "That's a tad short for a company name." } }, "contact": { "sanitize": "text", "rules": { "int": "Please enter only the digits of your phone number (no spaces or other punctuation)." } }, "message": { "sanitize": "entities1|textarea", "textField": true, "rules": { "required": "Please enter your enquiry/message.", "min(250)": "Please enter at least {$0} (but no more than 2000) characters.", "max(2000)": "You have reached the {$0} character limit. Please shorten your message." } } }, "info": { "fromName": "The ABC Accounting Team", "tel": "(011) 100 1234", "altTel": "(011) 100 5678" }, "emails": { "autoReply": { "template": "auto-reply", "to": "{input.name} <{input.email}>", "from": "ABC Accounting <noreply@abc.accounting>", "subject": "Enquiry/Message Submitted - Thanks!" } } } } As seen in the 'emails' key, templates can be defined for each email. These templates can be plain/HTML/both, and accept information regarding form input, the 'info' key, and a custom stylesheet, which is created as a file, but imported directly into the HTML version of the template. The module will also come with a jQuery module to assist in processing the form. Frontend is up to the developer/designer. Currently, the directory structure of the module is: root - forms.config.json / templates / form-name - template-name.html - template-name.css - template-name.txt I'm now thinking that it would be better to change the structure to this: root / form-name / templates - template-name.html - template-name.css - template-name.txt - config.json That is: each form will have its own folder containing configuration and templates. So I'm starting this thread to ask the following: Firstly, what do you think of this idea, and do you think you would make use of this module? Of the two structures above, which one would you prefer? Would you want the ability to make use of attachments in your emails (such as a logo)? (If I'm not mistaken, we'd then need to require WireMailSmtp or WireMailSwiftMailer...) As a side note, it's worth mentioning that this module is really intended to be used on small- to medium-sized sites that require multiple forms where developers are not in a position to obtain Ryan's excellent FormBuilder. Any input here is most welcome. (And yes, as gathered by my signature, the module is called SimpleForms. If you have a name suggestion, please feel free...)
    1 point
×
×
  • Create New...