Leaderboard
Popular Content
Showing content with the highest reputation on 10/20/2017 in all areas
-
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
-
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/VirtualParents8 points
-
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. Cheers3 points
-
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
-
I don't think <DIV> elements are valid children of <HEAD>. Element names may be the same, but IDs should be unique.3 points
-
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 welcome3 points
-
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
-
I don't have ProField here, you should test it now and report back2 points
-
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 luck2 points
-
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 though2 points
-
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
-
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
-
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
-
Or if you want a solution for generating poster images and providing an easy play option, check out: https://github.com/adrianbj/FieldtypeVideo2 points
-
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 request2 points
-
Docs & Download: rockettpw/seo/markup-sitemap Modules Directory: MarkupSitemap Composer: rockett/sitemap ⚠️ NEW MAINTAINER NEEDED: Sitemap is in need of developer to take over the project. There are a few minor issues with it, but for the most part, most scenarios, it works, and it works well. However, I'm unable to commit to further development, and would appreciate it if someone could take it over. If you're interested, please send me a private message and we can take it from there. MarkupSitemap is essentially an upgrade to MarkupSitemapXML by Pete. It adds multi-language support using the built-in LanguageSupportPageNames. Where multi-language pages are available, they are added to the sitemap by means of an alternate link in that page's <url>. Support for listing images in the sitemap on a page-by-page basis and using a sitemap stylesheet are also added. Example when using the built-in multi-language profile: <url> <loc>http://domain.local/about/</loc> <lastmod>2017-08-27T16:16:32+02:00</lastmod> <xhtml:link rel="alternate" hreflang="en" href="http://domain.local/en/about/"/> <xhtml:link rel="alternate" hreflang="de" href="http://domain.local/de/uber/"/> <xhtml:link rel="alternate" hreflang="fi" href="http://domain.local/fi/tietoja/"/> </url> It also uses a locally maintained fork of a sitemap package by Matthew Davies that assists in automating the process. The doesn't use the same sitemap_ignore field available in MarkupSitemapXML. Rather, it renders sitemap options fields in a Page's Settings tab. One of the fields is for excluding a Page from the sitemap, and another is for excluding its children. You can assign which templates get these config fields in the module's configuration (much like you would with MarkupSEO). Note that the two exclusion options are mutually exclusive at this point as there may be cases where you don't want to show a parent page, but only its children. Whilst unorthodox, I'm leaving the flexibility there. (The home page cannot be excluded from the sitemap, so the applicable exclusion fields won't be available there.) As of December 2017, you can also exclude templates from sitemap access altogether, whilst retaining their settings if previously configured. Sitemap also allows you to include images for each page at the template level, and you can disable image output at the page level. The module allows you to set the priority on a per-page basis (it's optional and will not be included if not set). Lastly, a stylesheet option has also been added. You can use the default one (enabled by default), or set your own. Note that if the module is uninstalled, any saved data on a per-page basis is removed. The same thing happens for a specific page when it is deleted after having been trashed.1 point
-
1 point
-
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
-
1 point
-
Firstly, sorry about the number of settings in Tracy - that isn't a sign of your lack of PHP knowledge, but rather a sign of my indecisiveness Really this is up to you. I leave it running - it's not accessible to regular users anyway. In production mode it can send you emails when it logs errors. But if you want you can uncheck the "Enable Tracy" option so there is no load at all from it, although it's not noticeable in production mode anyway.1 point
-
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-panel1 point
-
1 point
-
@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
-
@houseofdeadleg weird! I'm pretty intrigued with this. Gonna go try pagination right now on my test site. =EDIT= Ok, just did it and works ok. <?php namespace ProcessWire; ?> <?php // template file blog-index.php // make sure to set pagination on the template that lists the pages, // not on the template of the individual items that are being listed // i.e. in your case, on template 'news' ?> <?php // get top level posts only under /tutorials/ $entries = $pages->find("template=blog-entry|complete-guide, sort=-postDate, parent=1017, limit=6"); $pagination = $entries->renderPager(); ?> <div class="container py-5"> <?= $pagination; ?> </div> <div class="container py-5"> <div class="row"> <?php foreach ($entries as $entry): ?> <div class="col-md-4 mb-5"> <?php include("./includes/card" . ".php"); ?> </div> <?php endforeach; ?> </div> </div> ...outputs: <ul class='MarkupPagerNav' role='navigation' aria-label='Pagination links'> <li aria-label='Page 1, current page' class='MarkupPagerNavOn MarkupPagerNavFirst MarkupPagerNavFirstNum' aria-current='true'><a href='/processwire-tutorials/'><span>1</span></a></li> <li aria-label='Page 2'><a href='/processwire-tutorials/page2/'><span>2</span></a></li> <li aria-label='Page 3' class='MarkupPagerNavLastNum'><a href='/processwire-tutorials/page3/'><span>3</span></a></li> <li aria-label='Next page' class='MarkupPagerNavNext MarkupPagerNavLast'><a href='/processwire-tutorials/page2/'><span>Next</span></a></li> </ul> And on screen, just a basic list: Pretty confused at why yours don't click.1 point
-
If $x is a counter var, shouldn't it be $x = 0; // instead of empty string? ?1 point
-
1 point
-
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
-
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
-
Chrome has been officially updated to 62.0.3202.62 and now the problem is gone1 point
-
No don't do that. 'windowTitle' and 'headingSubtitle' are fields I created on MY own site. You more than likely don't have these fields. Whats happening is this (as per your example earlier): <title> <?php // any page OTHER THAN the home page if($page->id > 1) { // prints 'Employer branding - pracownik staje się klientem -' echo $page->title .' - '; } // prints 'Agencja PR Q&A Communications – Poznań, Gdańsk, Warszawa, Bristol' echo $home->title ?> </title> So that bit of code outputs: Employer branding - pracownik staje się klientem - Agencja PR Q&A Communications – Poznań, Gdańsk, Warszawa, Bristol ...which is what you are seeing and you referred to it as: If you just want the first bit, then you just need: <title><?php echo $page->title; ?></title> I'm not even sure if you can log into the admin on your site? If you can, you will see the 'Title' field on each page if you edit it. Browsing your site, look at the page titles and you'll see what's happening: http://www.qacommunications.com/ (Agencja PR Q&A Communications – Poznań, Gdańsk, Warszawa, Bristol) http://www.qacommunications.com/pl/kariera/ (Dołącz do nas! - Agencja PR Q&A Communications – Poznań, Gdańsk, Warszawa, Bristol) http://www.qacommunications.com/pl/zakres-dzialan/ (Zakres działań - Agencja PR Q&A Communications – Poznań, Gdańsk, Warszawa, Bristol) http://www.qacommunications.com/pl/biuro-prasowe/ (Klienci - Agencja PR Q&A Communications – Poznań, Gdańsk, Warszawa, Bristol) See what the code is doing now? 'Agencja PR Q&A Communications – Poznań, Gdańsk, Warszawa, Bristol' is the 'Title' field of your homepage. This is being appended to every other page title on every page other than the homepage.1 point
-
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
-
1 point
-
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 41 point
-
@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
-
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
-
@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 dude1 point
-
ProcessWire's database abstraction is the best of all CMS systems I know.1 point
-
Bumped to 0.3.0-beta: This release makes considerable changes to the way in which the module works. Here's the breakdown of notable changes in this release: No more page fields Instead of using actual attached fields on a page-by-page basis, the module now saves related data in a centralised manner to its own configuration, and page fields are built on the fly when needed. This means that, when a template is defined in the module's config to use sitemap options and is later removed from the list, sitemap options for affected pages are not removed. Should the template be added to the list at a later stage, all saved options for pages belonging to that template are 'restored', simply meaning that the module will refer to them during the build process. The only time sitemap options for a page are removed is when either the page in question is deleted after having been trashed, or when the module is uninstalled (everything gets deleted, in this case). Stylesheet Due to a bug in Chrome (and possibly other browsers, though untested), the stylesheet is now turned on by default. Further, small aesthetic changes were made to the stylesheet, and a bug regarding the priority column was fixed. Commit da42cb7 changelog: alter stylesheet use separate class-loader separate methods to traits bind options to module-config, instead of page-fields use stylesheet by default add debug trait remove gitignore stuff we don't need Requirements The module now requires at least ProcessWire 2.8.16+ or 3.0.16+, due to the use of saveConfig and getConfig. Upgrade notes As the module is in Beta, there is no upgrade path. You will need to uninstall Sitemap before installing it again if you would like to remove the redundant system fields. If it doesn't matter, then a normal upgrade will do fine.1 point
-
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
-
I'm making progress with all the necessary changes. On my dev server (not git-pushed yet), the following is complete: Languages: Multi-language is sorted. It now renders the sitemap according to Google standards, where a page's <url> is generated for each languages with alternate langs, including current. Method is not the same as above example (page-loop), but expands on the root-first-then-children process - this allows easier flexibility in terms of what we can ignore on a page by page basis. ISOs: Haven't created the separate language ISO field yet, as my my main concern is regarding names vs ISOs. If they are normally identical, then we would only need to declare a proper ISO name for the default language only when its URL matches the default root URL (ie: default URL root = site root). In this case, perhaps it would be better to simply have a module config entry for the default language only? The rationale behind this is that the language name (other than default) should be the same as the iso (for better SEO practice, I'd guess). I haven't yet bumped into a ProcessWire site that doesn't use the ISO for each language name accordingly. If I'm wrong, please point it out, and then I'll use the iso field, per the above example. Or perhaps I should simple allow the flexibility and have the ISO name fall back to the language name if not provided via a field (the default would still need one if it is root)? Image-support: Images are now picked up in all languages, given the process-change. If an image field is not specified in another language, it will fall back to the default language. Support for ImageExtra remains. Priority: not done yet. I'll follow a basic principal with this: if the priority is set on a specific page, then it will be added. Otherwise, the tag will be left out. If this is not the correct methodology, please let me know. (cc @psy) Note: I still need to do some testing on this...1 point
-
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 labels1 point
-
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
-
The most recent 0.8.0 exists on GH again: https://github.com/mikerockett/SimpleForms. Will bump to 0.9 soon after a few modifications have been made. With form building, I'm thinking of making use of the AbvFormBuilder method, but not sure yet. Still need to investigate how it all works.1 point