GetSimple Support Forum
ImForms - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13)
+--- Thread: ImForms (/showthread.php?tid=10022)

Pages: 1 2


ImForms - Bigin - 2017-11-02

ImForms support thread
http://get-simple.info/extend/plugin/imforms/1121/
ImForms - is in beta phase any suggestions are welcome!


RE: ImForms - Rob1n - 2017-11-03

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!


RE: ImForms - Bigin - 2017-11-03

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: 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


RE: ImForms - Rob1n - 2017-11-06

Thanks for that, I'll try your suggestions next time. The form really is excellent, good work!


RE: ImForms - webstudiodrachten - 2017-11-20

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


RE: ImForms - Bigin - 2017-11-21

Sure, enable debugmode in gsconfig file, then post the error message here


RE: ImForms - macoffers - 2018-02-22

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


RE: ImForms - Bigin - 2018-02-22

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.


RE: ImForms - jozue - 2018-07-12

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.


RE: ImForms - Bigin - 2018-07-12

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


RE: ImForms - jozue - 2018-07-12

(2018-07-12, 01:46:39)Bigin Wrote: 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.


RE: ImForms - Bigin - 2018-07-12

You're welcome!


RE: ImForms - JAKE - 2018-08-23

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'); ?>



RE: ImForms - Bigin - 2018-08-23

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: 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: 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.


RE: ImForms - JAKE - 2018-09-19

(2018-08-23, 14:41:28)Bigin Wrote: Code that you posted there you don't need - everything you need is in the documentation.

But the question wasn't about "imforms" but forms related to itemmanager.

I don't want to create "imforms" but to re-use a form for a item (item manager, IM) to be able to post new items then this method won't work.

If I wanted it to work like that I would need to re-create same form that itemmanager has for items.
Also I would need to create a custom module similar to EmailTransmitter that would take care of saving new item posted with this form and if needed adding a file upload field for imforms.

In the end I feel that the naming convention regarding these plugins is kind of confusing.
ImForms has basically nothing to do with IM i.e. ItemManager...

I'll guess it is just me but at least now I know better Smile


RE: ImForms - Bigin - 2018-09-19

Well, ImForms is based on ItemManager, so it is not a standalone plugin, therefore "Im" in prefix.


RE: ImForms - SalamandersPL - 2018-09-23

Hello there!

Thank you very much for this form plugin. It is one of the best I have ever seen!
My question: what about checkbox, radio and select fields? Are you going to include those extra features? Or anyone can?


RE: ImForms - Bigin - 2018-09-23

Thank you.
You can already use radio and checkboxes by specifying radio or checkbox as field type. However, there is an issue with the label position, since the label text should normally be to the right of the control. With some CSS tricks, maybe you'll get it work. You can nest the elements like that, and make the sub labels inline:
[Image: nesting-radios.png?raw=1]


When I find time, I'll take a look at the label issue, and select stuff ... maybe, is not sure yet.


RE: ImForms - Bigin - 2018-10-04

This is the answer to this question here: http://get-simple.info/forums/showthread.php?tid=10600&pid=63153#pid63153

(2018-10-04, 01:37:45)harley-peter Wrote: is there a description avalable about possible inupt attributs, form attributs, input types and so on? Try and error does not make fun. Undecided

Hello,
you can use any type you like, there are no restrictions: https://www.w3schools.com/html/html_form_elements.asp

(2018-10-04, 01:37:45)harley-peter Wrote: how can I define the place of button or field or checkbox (right, left, side by side, one after the other)?

Yeah, sure, the editing area is interactive, you can move elements around by drag & drop, and feel free to utilize your own stylesheets: https://www.w3schools.com/css/default.asp

;-)


RE: ImForms - harley-peter - 2018-10-04

Hi Bigin,
thanks for the hint, I will try it. It will be a nice experience because I am not a programmer (this is the reason for using GetSimple ;-)).
I have to realize also a button which causes a download of a document ... maybe I have to learn php too. :-)


RE: ImForms - harley-peter - 2018-10-09

Hi Bigin,
I've got a problem and need a help.
Where and how can I define an action (e.g. the call of an url) for an submit button? I do not find any possibility in ImForms.


RE: ImForms - Bigin - 2018-10-09

Hello,

usually buttons do not have an 'action' attribute, except perhaps 'formaction'. But you might want to define an 'action' attribute for your form? Or what exactly are you gonna do with it?


RE: ImForms - harley-peter - 2018-10-09

Hello,

I defined a button with the content "confirm" and the type submit in the button attributs. If someone click on the button I need a redirection to another site. So I need an action like href=.... if the button was clicked on.


RE: ImForms - Bigin - 2018-10-10

Again, a button has no attribute 'action' and no 'href': https://www.w3schools.com/tags/tag_button.asp. Use an <a> in a wrapper (the wrapper accepts html as content and use single quotes instead double quotes) which you style to look like a button: <a href='http://your-url.com' class='button'>Go!</a>

Code:
.button {
   display: block;
   width: 115px;
   height: 25px;
   background: #4E9CAF;
   padding: 10px;
   text-align: center;
   border-radius: 5px;
   color: white;
   font-weight: bold;
}



RE: ImForms - harley-peter - 2018-10-10

O. k. I will try it but I do not understand the sense of a button or an input form with type submit if I cannot define an action.

What should be happen if I click on the submit button in your contact demo? I cannot test it because on my localhost system the captcha function does not work.

Edit:
your suggestion for the button works in respect of the redirection but unfortunately not for my need. I have integrated also a checkbox in the form with the attribut "required" but your button construction does not matter if the checkbox is checked or not.