1078 comments found

  • Bought between 50 and 99 items
  • Has been a member for 1-2 years
ryanncl Purchased

I have problem saving multi checkbox into MYSQL.

HTML FORM
<div class="quform-option">
<label><input name="q2[]" value="One" type="checkbox" /> One</label>
</div>
<div class="quform-option">
<label><input name="q2[]" value="Two" type="checkbox" /> Two</label>
</div>
<div class="quform-option">
<label><input name="q2[]" value="Three" type="checkbox" /> Three</label>
</div>
FORM ELEMENT CONFIGURATION
$q2 = new Quform_Element('q2[]', 'Question 2');
$q2->addFilter('trim');
$q2->addValidator('required');
$form->addElement($q2);

MYSQL QUERY

$query .= "`q2` = '" . mysql_real_escape_string($form->getValue('q2')) . "',";

q2 is not saved to the database even though the rest of the script including the emailing is working perfectly. Is there something wrong with my q2 query?

ThemeCatcher

The value of the checkboxes is an array. Instead of

$form->getValue('q2');

Use:

$form->getElement('q2')->getValuePlain(', ');

Which will join the selected options with a comma.

Regards, TC

ThemeCatcher

Note: I edited the above code, so check the comment page for the correct code (in case you get an email with the wrong code).

  • Bought between 10 and 49 items
  • Has been a member for 1-2 years

Hi, I wounder how do I validate e-mail address, can’t fint that information.

ThemeCatcher

In the process file you need to add the ‘email’ validator to the element. For example:

$element->addValidator('email');

Where $element is the PHP variable for the form element you are currently configuring. There is an example of this in the default process.php file.

Regards, TC

  • Bought between 10 and 49 items
  • Has been a member for 1-2 years

I just wounder if it possible to use a real calendar, the solution for the date is not the best one, I can easy select 31/2/2014 and we know that there was not such date. I would like to block the possibility to chose days in the past too.

ThemeCatcher

Nothing built in for this, but you can apply the jQuery UI Datepicker script to a Text input field and it has options to block past dates. You would need to create a custom validation to prevent them submitting a date in the past (see the Adding a new validator section in the docs). There are some tutorials on the web for using jQuery UI Datepicker, you may need a PHP developer for the custom validator.

Regards, TC

  • Bought between 10 and 49 items
  • Has been a member for 1-2 years

My validation messages opens at a new page and not under the fields. Why is it happening?

ThemeCatcher

Hi,

Have you added the Quform JavaScript file? Or is JavaScript turned off on your browser?

Regards, TC

  • Bought between 10 and 49 items
  • Has been a member for 1-2 years
lety1 Purchased

I have this problem when I click send

There was a problem

’ . Quform::jsonEncode($result)

ThemeCatcher

This means that you aren’t submitting the form through a PHP enabled web server. It should be fine when you upload it or use something like WAMP or MAMP locally.

Regards Ally

  • Bought between 50 and 99 items
  • Has been a member for 4-5 years
MWNS Purchased

Hello, I have a question, I have 3 dropdown lists (year, month, day) to enter this data into the database I need bind the value of each select a single datum, for example 2014-03-27 .. but I can not access arrangement $ form-> getValue (‘date’); separated information, you could help me? Thank you very much.

ThemeCatcher

The the getValue call on a Date field returns an array. You can turn in into a string with the code:

$date = $form->getValue('date');
$date = $date['year'] . '-' . $date['month'] . '-' . $date['day'];

And later in the code, insert it with:

$query .= "`date` = '" . mysql_real_escape_string($date) . "',";

Regards, TC

MWNS
MWNS Purchased

thank you very much

  • Bought between 1 and 9 items
  • Has been a member for 0-1 years

I have also this problem :

when I click send

’ . Quform::jsonEncode($result)

I have changed jquery library (jquery1.11.0). What can i do please?

ThemeCatcher

This means that you aren’t submitting the form through a PHP enabled web server. It should be fine when you upload it or use something like WAMP or MAMP locally.

Regards Ally

  • Bought between 100 and 499 items
  • Has been a member for 2-3 years

Hello ThemeCatcher, I purchased this form builder by mistake and thought I was getting the Wordpress plugin. How can I go about getting a refund?

ThemeCatcher

Hi,

You will need to contact Envato for a refund. We do not deal with payments.

Regards, TC

  • Bought between 1 and 9 items
  • Has been a member for 0-1 years
  • Indonesia

I now use Joomla-based website. How do I install it on Joomla? Please help me… Thank you…

Default-user

Please help me, how the details of how to install Quform – Responsive Ajax Contact Form on my Joomla website? Since I am still new at this.

ThemeCatcher

I’m not familiar with Joomla. You will need to add the links to the CSS files in the head section, add the links to the JS files in the head or footer and put the form HTML on the page. This is described in the Install guide, the same steps should apply to Joomla, you may just need to find out how to put the JS and CSS links in there.

You can just put everything (links to CSS and JS and the form HTML) at the place you want the form to show, though it’s not recommended it should still work.

Regards, TC

  • Bought between 100 and 499 items
  • Has been a member for 3-4 years
  • South Africa

Hi there, this works perfectly on my dev server, but on the live server I get an error:

There was a problem

Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@tribalfish.net and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Apache Server at tribalfish.net Port 80

Please can you help me with what settings I need to fix.

ThemeCatcher

I sent you an email about this.

Regards, TC

  • Bought between 1 and 9 items
  • Has been a member for 0-1 years
shardy22 Purchased

Hello,

I successfully installed QUFORM on my contact page delaquis-antiques.com/contact.php. It works wonderfully, but now my sticky footer button is no longer working…This is the script with the html necessary to create the button: // Show or hide the sticky footer button $(document).ready(function() { $(window).scroll(function() { if ($(this).scrollTop() > 200) { $('.go-top').fadeIn(200); } else { $('.go-top').fadeOut(200); } }); // Animate the scroll to top $('.go-top').click(function(event) { event.preventDefault(); $('html, body').animate({scrollTop: 0}, 300); }) }); Back to Top

Unfortunately, I’m not a Javacript expert. But when I deactivate the js plugins for QUFORMS, my button works again. Is there a naming conflict (functions or variables) between the two?

Is there any way of correcting this problem?

Thanks in advance,

Stephan

ThemeCatcher

Solved on forums. In case someone has a similar issue in the future.

Regards, TC

  • Bought between 50 and 99 items
  • Has been a member for 4-5 years
MWNS Purchased

Hello, could you tell me how to use validations to check box? Thank you very much!

ThemeCatcher

I’m not sure what you mean, but I will answer anyway. To make a check box required, use this code in process.php at the element configuration section.

$my_checkbox = new Quform_Element('my_checkbox');
$my_checkbox->addValidator('required');
$form->addElement($my_checkbox);

Where my_checkbox is the unique element name.

Regards, TC

MWNS
MWNS Purchased

thanks!

  • Bought between 10 and 49 items
  • Has been a member for 3-4 years
  • Italy

There is a way to localize the form for several languages? I don’t like duplicate qform folder. Thank You

ThemeCatcher

Yes, you can translate the messages from within the process.php file, so you can duplicate this for each language and change the action attribute of the form to the path of the new process file. If you look in the documentation section: Changing the required error message – “This field is required” you will see how to translate the error messages from within the process file too. For translating other field errors, see the docs section: Validator options (Advanced)

Regards, TC

  • Austria
  • Bought between 50 and 99 items
  • Has been a member for 3-4 years
deseyr Purchased

hi, where can i change this message “This field is required” ?

thx a lot, greetings

ThemeCatcher

See the documentation section: Changing the required error message – “This field is required”

Regards, TC

  • Bought between 10 and 49 items
  • Has been a member for 4-5 years
HARTWM Purchased
mysql connection is not working
There was a problem
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'table SET `name` = 'Fake Name',`email` = 'harwm@email.com',`phone` = '7' at line 1
my code
 // Build the query
                $query = "INSERT INTO table SET ";
                $query .= "`name` = '" . mysql_real_escape_string($form->getValue('FullName')) . "',";
                $query .= "`email` = '" . mysql_real_escape_string($form->getValue('Email')) . "',";
                $query .= "`phone` = '" . mysql_real_escape_string($form->getValue('Phone')) . "';"; // Careful! The last line ends in a semi-colon
Default-user
HARTWM Purchased

disregard

  • Bought between 100 and 499 items
  • Has been a member for 6-7 years
  • Mexico
  • Referred between 1 and 9 users
Icemanmx Purchased

Hello my form dosenĀ“t show the successMessage on page, everything else is function…

Best Regards Icemanmx

ThemeCatcher

I replied to your forum post about this.

Regards, TC

Default-user
Icemanmx Purchased

Ok, i sent you the info you needed…

  • Bought between 50 and 99 items
  • Has been a member for 1-2 years
ryanncl Purchased

I would like to save the name of the uploaded file into a column in database. Is the below query correct?

$upload = new Quform_Element_File('upload');
$upload->getFileUploadValidator()->setRequired(true)->setMaximumFileSize(10485760);
$form->addElement($upload);
$query .= "`upload` = '" . mysql_real_escape_string($form->getValue('upload')) . "';"; 
ThemeCatcher

Try this code instead, for the second part:

$files = $form->getValue('upload');
$file = isset($files[0]['filename']) ? $files[0]['filename'] : '';

$query .= "`upload` = '" . mysql_real_escape_string($file) . "';"; 

Regards, TC

  • Bought between 1 and 9 items
  • Has been a member for 0-1 years

Hi,

Can you tell me how I can process an array of dates? We have an array of names which works ok and want to also get corresponding date of birth. At the moment when trying to submit I get ‘Element ‘named_driver_dob’ does not exist in the HTML but is being validated, you must also remove the element configuration from process.php’. I have tried various combinations of options but can’t get it to work whilst using the date validator.

Process.php $named_driver_dob = new Quform_Element('named_driver_dob', 'Named Driver D.O.B.'); $named_driver_dob->addValidator('date'); $named_driver_dob->setIsArray(true); $form->addElement($named_driver_dob); Example html… <select name="named_driver_dob[0][day]"> <option value="">Day</option> <option value="1">1</option> <option value="2">2</option> ... </select> / <select name="named_driver_dob[0][month]"> <option value="">Month</option> <option value="1">January</option> <option value="2">February</option> ... </select> / <input type="text" name="named_driver_dob[0][year]" /> <select name="named_driver_dob[1][day]"> <option value="">Day</option> <option value="1">1</option> <option value="2">2</option> ... </select> (etc...)

Thanks

ThemeCatcher

Instead of Quform_Element use Quform_Element_Date, and you would need to create a new element for each field. Example code for one field:

$named_driver_dob = new Quform_Element_Date('named_driver_dob[0]', 'Named Driver D.O.B.');
$named_driver_dob->addValidator('date');
$named_driver_dob->setIsArray(true);
$form->addElement($named_driver_dob);

Example code to detect a number of dynamically created fields, and add the same number of elements (not tested):

if (isset($_POST['named_driver_dob']) && is_array($_POST['named_driver_dob'])) {
    foreach ($_POST['named_driver_dob'] as $key => $value) {
        $named_driver_dob = new Quform_Element_Date('named_driver_dob[' . $key . ']', 'Named Driver D.O.B.');
        $named_driver_dob->addValidator('date');
        $named_driver_dob->setIsArray(true);
        $form->addElement($named_driver_dob);
    }
}

Edit: fixed code mistake.

Regards, TC

Default-user

That works great, thanks

by
by
by
by
by
by