1032 comments found.
Hi. Pre-purchase question.
Is it possible to edit your templates in the from builder?
I did not see a “next” or “back” button option in the builder to create step forms. Where can that be found? Looked at your demo. Thanks.
Hi,
You can customize all the templates as desired in PHP (you can’t load them into the drag & drop form builder)
The drag & drop form builder can do many things but not everything. Step forms have to be coded in PHP.
If you need anything else you’re welcome,
Gilles
Hello, Gilles.
I have some problem when a user click several times on submit button. How do disabled submit button after the first successful click?
I read the documentation and tried these variants:
- I use ‘core.form.invalid’ only for testing purposes.
1. In this variant console is clear.
[code] var fvCallback = function() { const form = forms[‘add-model-simple-form’]; const submitButton = document.getElementById(‘add-model-submit-btn’); }; [/code]
console.log('fvCallback'); // Not show in console
// form.fv is the validator
// you can then use the formvalidation plugin API
form.fv.on('core.form.invalid', function() {
// do stuff
// Disable the submit button
submitButton.setAttribute('disabled', true);
alert(submitButton.getAttribute('disabled')); //
});
2. In this variant I have seen true, but the submit button is still not disabled
.
[code] const form = forms[‘add-model-simple-form’]; const submitButton = document.getElementById(‘add-model-submit-btn’); [/code]
// form.fv is the validator
// you can then use the formvalidation plugin API
form.fv.on('core.form.invalid', function() {
// do stuff
// Disable the submit button
submitButton.setAttribute('disabled', true);
alert(submitButton.getAttribute('disabled')); // show true
});
3. In this variant I run this code in the console and it works. [code] const submitButton = document.getElementById(‘add-model-submit-btn’); submitButton.setAttribute(‘disabled’, true); [/code]
Hi Onore,
I tested with this code and the “contact form 1” template, and it works, the submit button is disabled:<script>
var fvCallback = function() {
var form = forms['contact-form-1'];
// form.fv is the validator
// you can then use the formvalidation plugin API
form.fv.on('core.form.invalid', function() {
console.log('invalid');
const submitButton = document.querySelector('#contact-form-1 button[type="submit"]');
submitButton.setAttribute('disabled', true);
});
};
</script>
So I think you have a problem with your own code.
Thank you. Yes some “our” strange code activate this btn again. We will be found the solution.
Hello, Gilles.
I have tried to create a Select2 that can search, add/create/remove tags by AJAX.
I could find any example in PHP From Builder.
I have tried to use data-ajax—url=”http://example.org/api/test” from https://select2.org/configuration/data-attributes$form->addSelect(‘model-tag[]’, ‘F_TAG’, ‘class=select2, data-tags=true, data-maximum-selection-length=3, data-token-Separators=[\’\,\’], data-ajax—url=”http://example.org/api/test”, data-allow-clear=true, data-close-on-select=true, multiple’);
But it have not changed the ajax-url.
What is the simple way to set AJAX options and function like createTag, removeTag?
Hi Onore,
The Select2 documentation gives an example with Ajax settings & data-attributes: https://select2.org/configuration/data-attributes Like it says you may try to separate each level of nesting by two dashes (—).
Else (or additionally) you can access & customize the Select2 Javascript in phpformbuilder/plugins-config/select2.xml
First duplicate this file into the plugins-config-custom folder to preserve the original.
Then you can either create a new XML node then call it from the $form->addPlugin function, or edit the default one.
data-ajax—url – It does not work.
phpformbuilder/plugins-config-custom/select2-ajax.xml
”$form->addPlugin function, or edit the default one.” And what to do with this “class=select2, data-tags=true” ?
$form->addSelect(‘model-tag[]’, ‘F_TAG’, ‘class=select2, data-tags=true, data- maximum-selection-length=3’);
Like this? $form->addPlugin(‘select-2-ajax’, ‘model-tag[]’) ?
This work $form->addPlugin(‘select2-ajax’, ’#xxx’, ‘default’, [‘theme’ => ‘clean’, ‘language’ => ‘uk’]);
I was planning to work on an example and put it online to help you, but haven’t had time to do it yet. Indeed, select2 needs you to send him the theme and the language, now I think you don’t need my help anymore?
I have another simple question for you. It have just published it here.
The several examples in documentation about how work with custom plugin will be amazing and might save your and user time. IMHO
Hi there If I have a database with 3 columns as below. If the customer selects NY in the city selection, can we restrict their product choice to NY products in the “select product section” which are Shirts and trousers only? And if the user selects Shirts- can we restrict their location choice to A in the “select location section” field? We want to use this functionality to narrow down the choices as we have multiple sites, work centers, products and locations. Database City Product Default location NY Shirts A NY Trousers B LA Cakes C LA Candies D AKL Computers E AKL Laptops F
Form Select City
Select Product
Select Location
Thanks
Hi,
Yes you can. You have to attach an event on select change, then fetch the results from your database with Ajax.
Here’s an example: https://www.phpformbuilder.pro/templates/bootstrap-5-forms/dependent-select-dropdown.php
If you need anything else you’re welcome,
Gilles
Awesome, thanks for your prompt response. Are there directions available on how to do that. Sorry I am not very knowledgeable in this area, just this for an inventory control project. Thanks again.
I don’t know your project, but did you check my PHP CRUD Generator?
If you want an admin dashboard with lists of your database content it’ll be a perfect tool for you.
If your database relations are properly made you can filter the lists and what you were asking for in your previous comment is a built-in feature.
For instance, you can list your products, select a city in the filter and see only the products of this city.
You won’t have to code with it. You generate your admin dashboard with the Generator, which allows you to configure everything.
If you want more information you can reach me on the chat at https://www.phpcrudgenerator.com/
Hello.
How can I make definition for onComplete callback for selected form/fileuploader?
like form.xxxxx…onComplete = function() {alert(‘1’)};
I can do it by changing the fileuploader.xml. But it will work for all fileuploader forms.
Hello,
Thanks for purchase.
I didn’t test it, but according to the File uploader documentation it should be done using its API.
You have first to set enableApi: true to activate the API methods in the fileuploader.xml (into the appropriate XML node, don’t miss this).
Then it should work with this kind of code:var api = $.fileuploader.getInstance(file_input_element);
// set Fileuploader option
api.setOption('onSelect', function(item, listEl, parentEl, newInputEl, inputEl) {
// callback will go here
});
If you need anything else you’re welcome,
Gilles
Thank you)
It works for Options.
But can it work for OnComplete?
OnComplete is CallBack inside the upload Object.
These variants dont work: api.setOption(‘onComplete’, function() { alert(‘Play Audio’); });
api.setOption(‘upload.onComplete’, function() { alert(‘Play Audio’); });
I had to play a bit with the fileuploader to find a working solution.
I guess ‘upload.onComplete’ doesn’t work because it’s not recognized as a valid core option name.
var api = $.fileuploader.getInstance(document.querySelector('#uploader-single-file'));
api.setOption('beforeSelect', function() {
// here we can find "this.upload.onComplete"
this.upload.onComplete = function() {
alert('Play audio');
}
});
For your information: an easy solution would be to duplicate and rename the xml node, add your upload.onComplete then call the plugin from PHP using this new config.
Another one would be to add your upload.onComplete to the xml node, and make a condition to read your audio or not (i.e: if some node exists).
If you need anything else you’re welcome,
Gilles
Brilliant answer. I have spent a lot of hours figuring out how it does. Thank you, Gilles.
Thanks to you Onore.
(if you like PHP Form Builder please don’t forget to rate it!)
Done.
Oh nice! Thanks!
hello i buy and other licence form my website PHP Form Builder Registration
but i have error Unfortunately, installation failed because of this reason: Domain is already in use by another client
i buy other becaus my other licenses say i ready install 2 time but is no please help me y have 2 licenses useless for me website
Hello,
Thanks for purchase.
Please could you email me your 2 purchase codes?
I’ll check the licensing system and tell you which domains are registered. Feel free to send me all the information I might need: which domain is “in use by another client”, which domain(s) you want to remove, ...
Gilles
I already sent it
Thanks, I answered your email
Unfortunately, installation failed because of this reason: License with email address ....@gmail.com or license code : xxxxx…. not found (or product not found or is inactive)
Why it keep saying this when i installed in the website? I am sure the code is correct (copy paste) and the email also correct.
thanks!
sorry this is wrong place… please ignore..
Unable to connect to MySQL (2002): php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known Please check your connection settings ENVIRONMENT: development (localhost) DBHOST: localhost-host DBUSER: localhost-user DBPASS: localhost-pass DBNAME: localhost-name
Other applications on my machine can connect to my online database instantly with the same credentials. I am running the phpformbuilder in install process on the same browser which can access my remote website mysql database. I have already made the changes in my localhost .htaccess file to correctly locate my localhost file folder, by the way.
Both localhost settings for my Mamp server running and for remote database access give me errors.
I went back to localhost install, I see that the db-connect.php file is written and contains the same connections string to my Mamp localhost mysql server that other applications use. Apparently the database connections worked but now the same Error “Unfortunately, installation failed because of this reason: The maximum number of allowed PHP CRUD Generator installations (2 installation(s) total) reached” Stuck.
the only place I have ever tried to install this application is in on a localhost machine.
Hello,
Thanks for purchase.
You have left 4 rather long comments, I paste them below with my point by point answers.
“Unfortunately, installation failed because of this reason: The maximum number of allowed PHP CRUD Generator installations (2 installation(s) total) reached”The answer is here in the documentation:
https://www.phpcrudgenerator.com/help-center#maximum-number-of-allowed-installations-reachedEach Regular License allows 2 installations – 1 for your development server (localhost), the other on production server.
You can reinstall anywhere & at any time, but you can’t have more than 2 simultaneous installations activated.
You have to uninstall PHPCG before reinstalling elsewhere.
I tried several times with a new Mamp install on my machine. I left the password as I saw it wrapped by % % Tried several times on initial install with different passwords when install failed with rejected database connection.
The ”%” are placeholders. You just have to enter your credentials into the target fields.Now I think I have the correct password without these %% wrapped around it but I get this error and can not continue. I have read every link but the “license” details are very unclear.
Here are the license details from Envato: https://codecanyon.net/licenses/standardAnd in PHP CRUD Generator’s documentation: https://www.phpcrudgenerator.com/tutorials/about-php-crud-generator-license
I have never installed this application online. But licensing does not permit localhost as an install.
No, this is not true. Same answer as #1, explained in the documentation: Each Regular License allows 2 installations – 1 for your development server (localhost), the other on production server.You can reinstall anywhere & at any time, but you can’t have more than 2 simultaneous installations activated.
You have to uninstall PHPCG before reinstalling elsewhere.
So, I have to put in ONE http/s url even if I don’t know if I will wind up installing the application online. All my work is done localhost first.
Here’s How to use PHPCG on a localhost and a remote server: https://www.phpcrudgenerator.com/tutorials/how-to-use-phpcg-on-a-localhost-and-a-remote-server
Apparently, to be clear to install this program now on my localhost, I must purchase another license at $40. Extending support purchase is not enough.
No. You can install on both localhost and a remote server with a single regular license (I already mentioned this in the previous answers.)
You should provide a code that is embedded in an online application. So that I can install localhost as many times as I need, for instance, on several machines—a work laptop that travels and my development machine at home. And not count as an installation until the INSTALLATION FINISHES. Your application registers an installation failure as an instance that is counted against “2 installations”.
No, that’s not true.1. If you want to use on several localhost instances (several computers, ...) you have to install on the first one, then copy the files and database to the others. If you use the same hostname it’ll work perfectly.
2. If you open the installer at the same place where you installed it (same hostname and same database) you’ll see that the script is already installed. Then you can enter your purchase code to uninstall and reinstall anywhere.
You should allow open localhost installations that are completed successfully.
And then when I decide to put up an admin dashboard online at a host I embed the authorization code so that it can be checked as One Online installation.
I don’t understand exactly why you would open the program before finishing the installation successfully. And I can’t and have no reason to disallow any local URL.
So, if I pay $40 will this give me ONE online domain installation? And a localhost installation of the FormBuilder itself?
I think I already answered this point several times:I went back to localhost install, I see that the db-connect.php file is written and contains the same connections string to my Mamp localhost mysql server that other applications use. Apparently the database connections worked but now the same Error “Unfortunately, installation failed because of this reason: The maximum number of allowed PHP CRUD Generator installations (2 installation(s) total) reached” Stuck.Each Regular License allows 2 installations – 1 for your development server (localhost), the other on production server.
You can reinstall anywhere & at any time, but you can’t have more than 2 simultaneous installations activated.
https://www.phpcrudgenerator.com/help-center#maximum-number-of-allowed-installations-reached
If your connection now works it means that you previously entered some wrong credentials to connect to your database.the only place I have ever tried to install this application is in on a localhost machine.
Yes, but I guess that you installed at 2 different URLs (hostnames). So you have to uninstall before reinstalling elsewhere.If you can’t uninstall (if you have removed your hostnames and files for instance):
please send me your purchase code and I’ll remove your installation manually from the licensing server.
https://www.phpcrudgenerator.com/tutorials/how-to-uninstall-reinstall-php-crud-generator
greeting i want to know can i create a form with the your PHP builder and and get source code to implement it on my website??? want to know before i make the purchase
Hello,
Yes you can, everything is explained on the website, you can test the drag & drop form builder and get the source code in the demo.
If you need anything else you’re welcome,
Gilles
How to ask user to enter a Youtube URL, and script automatically shows the thumbnail of that video , before submitting form, so that URL is validated ?
Hello,
Did you purchase PHP Form Builder?
What you’re asking for can easily be done in adding a small Ajax script to your page.
Could you send me a php demo of mysql table creation since I see that it has to be done manually
My mail Is bassdeth@gmail.com
Hello,
Sorry my answer comes a bit late. I answered your email.
Hello, I did not know that you had the crud script which I would like to buy but I see that you have the form script that I just bought. Could you give me a discount to buy the crud scrip or give me money back to make the purchase of crud
Hello,
Yes of course. Please purchase the CRUD then ask for a refund from your Codecanyon account and I’ll accept it.
If you need anything else you’re welcome,
Gilles
Hi! I bought the script a long time ago and only now are we going to put it to work. I haven’t found how to create a multi step form. Can you help me? thanks
Hi,
Thanks for purchase.
You should at first download the latest version on Codecanyon. Then you’ll find some multi-step forms examples in the templates, e.g: https://www.phpformbuilder.pro/templates/index.php?framework=bootstrap-5&forms=step
Finally if you need more help please email me your FTP access and URL.
Gilles
I found it in templates. But how can I edit an emplate in Phpformbuilder?
You can copy the code into any file on your server, then customize it.
The step forms can’t be done with the drag and drop tool, you have to use the functions to add fields and setup your forms.
I don’t have any idea of your coding skills, but if you want me to help you to debug your forms I can help you for free, else if you want me to code them I’d need all the forms details, and may work for you as a Freelancer.
Hello Migili I have contacted already once, still waiting for reply. It was about when PHP form is generated the email address is openly available/visible in the code generated in the .php document. How to hide it from spambots? I am mentioning this now because I have in the last 2-3 days received 2 unsolicited emails from spammers. The php form has captcha, so they must be entering data manually? How to further secure email form from being used by spammers? Thanks for your help. Peter
Hello Peter,
I already answered you yesterday: https://codecanyon.net/item/php-form-builder/8790160/comments?page=1&filter=all#comment_28560690If you need anything else you’re welcome,
Gilles
Hello PHP Contact Form Support I am a little concerned that in the code generated from the php form builder generator my form email is exposed and potentially available for spambots to copy. Is this correctly understood? How do I implement an extra security level so this form email is hidden?
Thankyou for your assistance,
Peter Bach Nielsen
Hello Peter,
All the PHP code is on the server side, so it’s not exposed to any bot. When the URL is called by the browser it goes to your server.
Then your server does the work, just like if it was a software on your computer (it validates the posted data then sends the email).
Finally your server sends the page content back to the browser with the confirmation message. As you can see the PHP code is executed on your own server and never goes away from it.
When I want to show an email address on a page (which the forms don’t do) I always use this function:public static function hexaEncode($str) // encode email addresses
{
$long=strlen($str);
$output = '';
for ($i=0; $i<$long; $i++) {
$output .= '' . bin2hex(substr($str, $i, 1)) . ';';
}
return $output;
}
It returns an encoded code, harder for bots to understand that it’s an email address.
hello is it possible to create a work order using your builder? if yes, how to create conditions time based on total amount?
Hello,
Yes, indeed everything is possible. If you need some calculations you have to code them in PHP.
If you buy the package and can send me some clear specifications I may do the job for you (as a Freelancer job)
Gilles
thank you. can I store the forms in database?
An excellent database PDO wrapper is provided, the documentation is here: http://phpformbuilder/documentation/class-doc.php#database-overview
and more details with all the functions and code examples here: https://www.phpformbuilder.pro/documentation/db-help.php
How do I reset my license as I cannot reinstall PHP Form Builder after my server has crashed?
Hello,
Everything is explained here: https://www.phpformbuilder.pro/documentation/help-center.php#reinstall-phpfb
HI, just a quick one hopefully. Trying to set an object “required” and also NOT “required” at runtime. Realise not a phpformbuilder problem.
Have tried numerous possibilities like
document.getElementById(“name”).setAttribute(“required”, ””);
But just doesnt seem to work, any help greatly appreciated. Starting to pull my hair out over this little one. Thanks Steve
Hi,
This should work fine:
document.getElementById("name").required = false;
Or
document.getElementById("name").removeAttribute('required');
If you need anything else you’re welcome,
Gilles
Hi, it seems that there is a small path mistake e.g. in script default-db-values-form.php, same in the customer support script – all the other ones are working. When I correct the paths (php error messages, e.g. Warning: include_once(/Volumes/WEB/buddigthoma.com/phpformbuilder/Form.php): failed to open stream: No such file or directory in /Volumes/WEB/buddigthoma.com/php/phpformbuilder/templates/bootstrap-5-forms/default-db-values-form.php on line 15), I get a database error: Fatal error: Uncaught Error: Call to a member function prepare() on null in /Volumes/WEB/buddigthoma.com/php/phpformbuilder/phpformbuilder/database/DB.php:324 Stack trace: #0 /Volumes/WEB/buddigthoma.com/php/phpformbuilder/phpformbuilder/database/DB.php(456): phpformbuilder\database\DB->query(‘SELECT productl…’, Array, false) #1 /Volumes/WEB/buddigthoma.com/php/phpformbuilder/phpformbuilder/database/DB.php(581): phpformbuilder\database\DB->queryRow(‘SELECT productl…’, Array, false, 5) #2 /Volumes/WEB/buddigthoma.com/php/phpformbuilder/templates/bootstrap-5-forms/default-db-values-form.php(86): phpformbuilder\database\DB->selectRow(‘products’, ‘productlines_id…’, Array, false) #3 {main} thrown in /Volumes/WEB/buddigthoma.com/php/phpformbuilder/phpformbuilder/database/DB.php on line 324. The installation is under my web root /php/phpformbuilder/
Hello Thomani60,
This is not an error. In the Quickstart guide:
Add the phpformbuilder folder at the root of your project .
If you want to put the phpformbuilder folder inside a subfolder, please read this to avoid PHP errors or warnings.
If you need anything else you’re welcome,
Gilles
Hi there, I know my support has expired, but I am no programmer at all and only encountered an issue now. I need the user to upload an image file. Now, this works and the file gets stored on the webserver. But how do I show the uploaded image URL in the E-Mail to the recipient? There is only a {table} in the default.html Email I am using from your files. Can I somehow add the URL to the uploaded image there as well so I can click and view the uploaded image?
And, if possible: the uploader in the form is in english (choose file, browse file etc.) – is there any place I need to look so I can translate this?
Many thanks!!!
I found the translations
But if you could help me on how to make the recipient able to open/view the uploaded image…would be cool! Thanks
Hi Hoodvisions,
Thanks for purchase, and don’t worry about expired support, I’m still available.
You can find here how to get the uploaded file name: https://www.phpformbuilder.pro/documentation/javascript-plugins.php#fileuploader (scroll down to “To deal with the posted uploaded files“).
All the $_POST keys/values are dispatched in the email template’s table.
The trick is to replace the posted image value with the URL you want.
Here’s a sample code:
// once the form is validated
if (isset($_POST['user-logo']) && !empty($_POST['user-logo'])) {
$posted_img = FileUploader::getPostedFiles($_POST['user-logo']);
$filename = $posted_img[0]['file'];
// Here I replace the $_POST value with the image URL
$_POST['user-logo'] = '<a href="https://www.domain.com/uploads/' . $filename . '">' . $filename . '</a>';
}
If you need more help please email me your FTP access and URL then I’ll have a look.
Gilles
Hi Gilles, many thanks for the help!! I failed horribly, asked a friend and we managed to somehow inject the filename into the mailing template by hacking one of the color variables. There was no way the mailing would take any input from the array after the message fields.
However, one more question: Right now anyone can upload images to the webserver at any time, even without submitting the form at all. Browse images, upload, and they’re in the folder. No need to fill out email etc. or send the form. So basically it’s a free server for possible illegal content. Is there any (easy!) way to force the file uploader stuff to only deploy the file on the webserver AFTER the user has submitted the form?
I see different possibilities.
- Remove the file uploader plugin and use a simple input[type=”file”]. Then the file will be uploaded when the form is posted.
- Make a 2-steps form with the uploader in the 2nd step
- Create a first folder and PHP script to delete all the files inside it let’s say every five minutes. Upload the images from the uploader inside this first folder. Then when the form is posted, move the uploaded file from the first folder to a second one.
If you need anything else you’re welcome,
Gilles