GetSimple Support Forum

Full Version: ImForms
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
ImForms support thread
http://get-simple.info/extend/plugin/imforms/1121/
ImForms - is in beta phase any suggestions are welcome!
Hi,

I really like the form builder you have created. I have had a few issues with it though. I couldn't get smtp to work at all despite numerous attempts with my servers smtp settings, variations of that and also i tried googles smtp settings. couldn't get that to work at all which was a bit frustrating.

I can use it with smtp disabled but the emails that are sent from the form to my gmail end up in the spam folder with the message "This message may not have been sent by: xxxxxx@gmail.com Learn more Report phishing".

The form is responsive which i like, except the google captcha. What i did to fix that was I added data-size="compact" to this line in lib/elements.php:
return '<div '.(($this->class) ? ' class="'.$this->class.'" ' : '').'data-sitekey="'.$this->site_key.'" data-size="compact"></div>';

That reduces it to a smaller size which fits mobile screens but still is OK on larger screens.

I'm not going to bother with smtp this time as I've finished that project and moved on but if those kind of issues could be fixed it would be absolutely ideal for future use!
Hello Rob1n,

thank you for your feedback.
Well, firstly, ImForms have nothing to do with your SMTP settings, it allows you to use the same settings as PHPMailer, no more no less. On my demo page it also works with a standard Gmail account: http://demos.ehret-studio.com/imforms/

My SMTP settings are as follows:
Code:
$config->mailerDebug = 0;
$config->emailFrom = '******@gmail.com';
$config->emailFromName = '**** *****';
$config->useSmtp = true;
    $config->smtpHostname = 'smtp.gmail.com';
    $config->smtpUser = '******@gmail.com';
    $config->smptPassword = '**************';
    $config->smtpEncryption = 'START_TLS';
    $config->smtpPort = 25;

On PHPMailer's Github page below, you will find a simple example script, that you can use in your environment to find out your correct SMTP settings, If this doesn't work then there is something wrong with your server:
https://github.com/PHPMailer/PHPMailer

You can also try changing the mailerDebug variable to 2 or 3 and take a look at the ItemManager's log file under: /data/other/logs/imlog_2017**.txt

(2017-11-03, 18:30:24)Rob1n Wrote: [ rel="nofollow" -> ]The form is responsive which i like, except the google captcha. What i did to fix that was I added data-size="compact" to this line in lib/elements.php:
return '<div '.(($this->class) ? ' class="'.$this->class.'" ' : '').'data-sitekey="'.$this->site_key.'" data-size="compact"></div>';

That reduces it to a smaller size which fits mobile screens but still is OK on larger screens.

That's a good thing it will be implemented in the next versions, or I can add an additional variable for this purpose.

Best regards
Thanks for that, I'll try your suggestions next time. The form really is excellent, good work!
hello, i tried to set my email by using a custom.config file. But when I try this I get a blank screen and my website is totally shutdown. When I delete the custom.config file my website is back again. Plugin works great but to set my own emailadress it's failing.

Do you know how to solve this?

Kind regards
Sure, enable debugmode in gsconfig file, then post the error message here
Confused I need a little help.
A demo contact form could not be created.
I see that the config.php does not get generated.

Everything else during installation seems to be ok:

• Installation process is finished
• ItemManager is already installed
• The variable useAllocator is set to true
• Current ItemManager version is at least 2.4.1
• The imforms category already exists
• The imforms_cache category already exists
• You are running PHP 5.6.33
• A demo contact form could not be created
1. Enable debugmode in gsconfig file.
2. Make sure that PHP has write permission in "data/imanager/" folder
3. Go to 'ItemManager' Tab > 'Categories' and remove: 'imforms_cache', 'imforms'
4. Delete the file config.php under /plugins/im_forms/inc/ directory, if exists.
5. Try the installation again

P.S Make sure there are no JavaScript errors in your browser's console during installation.
It provides a form and sending emails too or building form only? What is still to be set up to send an e-mail to the address specified in the custom.config.php?
After I turned on debug mode, I found an error message in the log: Could not instantiate mail function.
Are you trying to send your mails from a local server? Did you read plugin description? It says that you need a configured mail server (PostFix for example) to send mails. There is also where you have to enter your e-mail address, it is the file custom.config.php
(2018-07-12, 01:46:39)Bigin Wrote: [ rel="nofollow" -> ]Are you trying to send your mails from a local server? Did you read plugin description? It says that you need a configured mail server (PostFix for example) to send mails. There is also where you have to enter your e-mail address, it is the file custom.config.php

Thakn you for your replay. It already works. I tried it from a local server. I am sorry. Your plugin is great.
You're welcome!
Hi

How am I supposed to render form? The plugin page doesn't cover this and has only a overly simplified example.

For example which class I need to include in template.php  to get $imforms variable to use for query and rendering a form?

If I follow the plugin page's direction it will crash on imforms not defined.

EDIT: Answering to myself and stating that the documentation is lacking this whole Factory thing. 

PHP Code:
<?php $imforms = new ImForms\Factory(); ?>
<?php $imforms_processor 
$imforms->getProcessor(); ?>

<?php $imforms_controller = new ImForms\Controller($imforms_processor); ?>
<?php $imforms
->setController($imforms_controller); ?>
<?php $form 
$imforms_processor->getFormByName('contact'); ?>
Hello,

the plugin page covers it very well, you just have to read carefully, especially the section "Usage": http://get-simple.info/extend/plugin/imforms/1121/

It says there that you can use "one" of the two possible methods for rendering the forms: Automatic output "or" Manually output.
If you have nothing special, then I would choose the Automatic method. How that works is also written there -  if you still have problems, you can report them here.

(2018-08-23, 06:17:54)JAKE Wrote: [ rel="nofollow" rel="nofollow" -> ]If I follow the plugin page's direction it will crash on imforms not defined.

Then the installation is wrong or you forgot something.

(2018-08-23, 06:17:54)JAKE Wrote: [ rel="nofollow" rel="nofollow" -> ]EDIT: Answering to myself and stating that the documentation is lacking this whole Factory thing. 

PHP Code:
<?php $imforms = new ImForms\Factory(); ?>
<?php $imforms_processor 
$imforms->getProcessor(); ?>

<?php $imforms_controller = new ImForms\Controller($imforms_processor); ?>
<?php $imforms
->setController($imforms_controller); ?>
<?php $form 
$imforms_processor->getFormByName('contact'); ?>

Code that you posted there you don't need - everything you need is in the documentation.