Code

Discussion on Quform - WordPress Form Builder

Discussion on Quform - WordPress Form Builder

Cart 36,057 sales

ThemeCatcher supports this item

Supported

This author's response time can be up to 1 business day.

6659 comments found.

Hi ThemeCatcher Team, I have a question. I need my user to select three and only three images from a group of 12. Once they do this, the button to proceed to the next page should appear. They can change their selection, but it should always require 3 items to be selected

Should I use Radio Buttons or Multioption?

What should I add to restrict the selection to 3 items and where?

Hi

You can use the Checkboxes element to have a field where the user can select multiple images, and use this guide to limit the number of choices. You’d want to adjust the code in the Server Side Validation to allow only 3 selections ($count must be 3).

With this Server Side Validation code in place, it won’t be possible to move to the next page until 3 are selected. The button to proceed to the next page will still be visible though, you can hide/show it with custom JavaScript if necessary based on the choices, but you might need a developer for that.

Regards, TC

Hello, we try to add new subscriber from quform with a php code in our function.php and have a problem. add_filter('quform_post_process_1', function (array $result, Quform_Form $form) { if (function_exists('mailster_subscribe')) { $email = $form->getValue('quform_1_3'); $name = $form->getValue('quform_1_4'); $lists = array('our_list'); $doubleOptIn = false; $data = array( 'firstname' => $name[2], 'lastname' => $name[4] ); mailster_subscribe($email, $data, $lists, $doubleOptIn); } return $result; }, 10, 2); The e-mail address is entered correctly in the list but the first and last name are not. Thank you for a quick help

Hi

If your form is using a Name field (rather than two Text fields for First Name and Last Name), the name value is an array – the first name is stored in $name[2] and last name in $name[4].

Regards, TC

Thank You! I use this code and it works. i hope its corret!? :) add_filter('quform_post_process_1', function (array $result, Quform_Form $form) { if (function_exists('mailster_subscribe')) { $email = $form->getValue('quform_1_5'); $vorname = $form->getValue('quform_1_9'); $nachname = $form->getValue('quform_1_10'); $lists = array('my-list'); $doubleOptIn = false; $data = array( 'firstname' => $vorname, 'lastname' => $nachname ); mailster_subscribe($email, $data, $lists, $doubleOptIn); } return $result; }, 10, 2);

Hi

Looks good to me :)

Regards, TC

hi cna you please tell me if this set up is okay? https://share.zight.com/nOu7Wxdg

when I set the “from address” to the email of the sender, if he uses gmail, outlook, yahoo and so on, Im unable to receive email, is it compulsory to set always in the FROM, an email with the exact domain I own?

Hi

I wouldn’t recommend this setup. The “From” address should be a permitted sender address for the mail server, otherwise the email sent from Quform is spoofing the email sender which usually gets caught in spam.

If you are using an SMTP WP plugin to send the email you would use an email address that is allowed as a sender for the SMTP server. If you aren’t using an SMTP server, it should probably be set to an email address with the same domain as the website.

See our email help guide for more info.

Regards, TC

is there a way to make the signature mandatory before submitting the form?

Hi

Assuming the Signature field guide is followed, you can make sure that the field is Required in Step 3.

Regards, TC

Hello,

How can I target a field in a form in order to fill it with Javascript code? I use WP Coder Pro from Wow Plugins to write Javascript that executes in pages of my choice.

Thanl you for your time,

Mahers

Hi Mahers

Sorry about the delay, not sure how we missed your comment. You can use jQuery to populate a field with JavaScript. Each field has a unique class quform-field-X_Y where X_Y is the field unique ID. Here’s some example code that will populate a field:

jQuery('.quform-field-1_21').val('some value');

You’d just need to replace 1_21 with your own field unique ID.

Regards, TC

hi there, Im having this issue, please have a look at this image; https://share.zight.com/mXuWo7rB

1. how can I reduce the size of the input field, textarea etc, I’ve applied this in the global and also in the form style:

in the global section; .quform-2 .quform-spacer { padding: 0 !important; margin: 0 !important;

in the form global section (selector: text input fields: padding: 10px 12px 12px 10px !important; (and it doesnt reduce the size of the field)

is there a way to make it through the Global section?

2. how can I reduce the space between the columns? (see attachment)

3. How can I move the submit button higher up?

4. is there a way to style the upload file option (see attachment): https://share.zight.com/Z4uNxzXX

Hi

1. The WP theme is setting a min-height on the input fields. Please try adding this additional CSS to selector: Text input fields:

min-height: 0;

2. You can add this CSS code to the global plugin CSS styles (Form – Settings – Custom CSS & JS – Custom CSS (All devices)):

.quform-element-row.quform-element-row-2_4 {
    margin: 0 -3px !important;
}
.quform-element-row.quform-element-row-2_4 > .quform-element-column {
    padding: 0 3px;
}

3. It looks like you have solved this.

4. You can style the upload dropzone from the Global CSS styles section, add a new style with selector “Upload dropzone” and enter some CSS, for example to reduce the size:

padding: 0;

Regards, TC

hi, in the point 3. I did it with: margin-top: -8px !important;

is that okay or what is the suitable way?

Hi

Yes, that’s a perfect way to solve it.

Regards, TC

hi, thanks for your response, I would like to know if there is a way when clicking the field to focus the border through the global css settigs, or I need to necessary use the text input field (focus) option.

secondly, how can I remove the padding or margin, I’ve use the vertical space to 0px but nothing, please check image.

https://share.zight.com/nOu7gLmm

thanks and nice plugin!

by the way, I’ve used this css code on the Custom CSS & JS section

quform-spacer { padding: 0 !important; margin: 0 !important; }

but still have that space

Hi

You could use the settings at Edit Form – Settings – Style – Fields – Field border color – Focus, or add this CSS in the global plugin CSS settings:

.quform input:focus,
.quform textarea:focus,
.quform select:focus {
    border-color: #123456;
}

It looks like the CSS you posted is missing a dot (period) at the start, can you try:

.quform-spacer { padding: 0 !important; margin: 0 !important; }

If this doesn’t work, it might be the WP theme that is adding a bottom margin to the input fields, you could try adding a global style at Edit Form – Settings – Style – Global – Add global style, choose the selector “Text input fields” and enter the CSS:

margin-bottom: 0;

If this works, repeat this for selector “Textarea fields”, otherwise could you please post a link to the page with the form, or send the link privately using the contact form on our profile page.

Regards, TC

I want fields borders to turn red, when there is a error, can you please explain how to achieve that? I’ve read about your default form themes, but I want this from scratch with css. can you please help.

Hi

When no theme is active, the div wrapping element still has the class “quform-has-error” that you can use to style the border. To do this, you can add the following code to Forms – Settings – Custom CSS & JS – Custom CSS (All devices):

.quform .quform-has-error .select2-container--quform .select2-selection,
.quform .quform-has-error input,
.quform .quform-has-error textarea,
.quform .quform-has-error select {
    border-color: #c73412;
}

Regards, TC

Hello, I want to prepare an e-mail campaign and I am using madmimi. Is there a chance to integrate Madmimi and Quform?

Hi

You can use the Quform Zapier add-on to integrate with Mad Mimi. You can follow our integration guide here and choose one of the Mad Mimi actions at the end of the Zap configuration.

Regards, TC

Another question: is it possible to automatically insert the phone code in a read-only field once you’ve chosen a country?

Thank you for your time

Maher,

Hi

There isn’t anything built into the plugin to do this, you can implement the International Telephone Input field on top of a Quform Text field if that suits, which includes the flags and country code.

You can install this plugin to do this. Then, in Quform have a Text field for the phone number and in the field settings on the Styles tab add the custom class quform-intl-tel-input to enable the functionality.

Regards, TC

Hi there,

I have a form with a list of countries to choose from. Is it possible to insert the flag of each country next to the name of the country?

Thank you for your time

Maher,

Hi Maher

It would require custom development to do this. You can enable the “Enable enhanced select” option on a Select Menu field with countries as the options, to convert it to a Select2 field, but it would require some additional development to add flags to each country, you may need a developer.

Regards, TC

hi, how can I get the error message similar to this;

https://snipboard.io/iaK5wS.jpg thanks

Hey,

In your form settings, go to Style – Global – Global CSS Styles, then add Element error inner wrapper with the CSS below:

background-color: transparent; 
border: none 0;
padding: 0;
font-style: italic;

If you’re also looking for the field borders to turn red, it is already coded into most of the form themes, so you can just choose another theme? Style – Global – Global CSS Styles – Theme

Kind regards, TC

but what if I want field borders to turn red to make it from scratch because I dont usually use form themes

Hi

When no theme is active, the div wrapping element still has the class “quform-has-error” that you can use to style the border. To do this, you can add the following code to Forms – Settings – Custom CSS & JS – Custom CSS (All devices):

.quform .quform-has-error .select2-container--quform .select2-selection,
.quform .quform-has-error input,
.quform .quform-has-error textarea,
.quform .quform-has-error select {
    border-color: #c73412;
}

Regards, TC

Hello! I’m trying to limit the entries selected for a specific field but it’s not working. Could you guys check it out my code and show me what I’m missing, please?

add_filter(‘quform_element_valid_7_16’, function ($valid, $value, Quform_Element_Field $element) { // Define the value that, when submitted, should limit submissions $target_value = 3; $limit = 3; // Set the submission limit for the value }, 10, 3);

// Unique key to store the count in the database
$count_key = 'quform_submission_count_for_value_' . $target_value;
// Get the current count from the database
$submission_count = (int) get_option($count_key, 0);
// If the submitted value is equal to the target value and the count exceeds the limit, add an error
if ($value == $target_value && $submission_count >= $limit) {
    $element->addError('Slots for this date are sold out!');
    $valid = false;
} elseif ($valid && $value == $target_value) {
    // If the submitted value is equal to the target value and the limit has not been reached, increment the count
    update_option($count_key, $submission_count + 1);
}
return $valid;

Thank you!!!

Hi

It looks like it should work, but you’d need to set the $target_value to the exact value submitted from the form. Also, I don’t think it should increment the count in this hook because it will increase the number each time the form is validated which can happen more times than the form is successfully submitted.

The counter should be incremented in the quform_post_process_X hook so that it’s only done once per form submission. You might need a developer to implement this for you.

Regards, TC

Thank you! Could you please reply to my email regarding another question?

Email sent.

Regards, TC

Hi

1-I need a plugin that saves form data

2- The visitor can create an account if he wants to see the data he sent, he has sent or not (display in a table title – message)

3- Email not obligatory

4- Compatible with wp all export

5- Multilingual (wpml + RTL)

6- I can add custom fields (calendar – -radio – box checked – select – mutiselect….)

7- Conditional display of lists (select states with search field ..)

8- ulpode file

Thanks

Hi

Most of this is possible with Quform, you can try the demo to make sure that it meets your needs as well.

1. Yes.

2. To create a user account from a form submission see this guide.

3. Email address fields can be added and not be required (but you would need it to be required to create a user account in #2 above).

4. We can’t guarantee if Quform is compatible with this plugin. You can export entries within Quform from Forms – Tools – Export Entries though.

5. RTL is supported, we have a WPML add-on here.

6. These field types are already built into the plugin.

7. You can use conditional logic to show or hide fields based on a value selected in another field.

8. Yes.

Regards, TC

Hi there, I hav quick question with form functionality. Can we able to make Invoice form that has tax calculation, discount, net rate, etc?

Hi

Calculations currently require custom coding, see this page for example code. You may need a developer.

Regards, TC

Hi,

Lately we are getting empty submissions like this https://imgur.com/a/HaqZlxY anti-spam honey pot is enabled and the filled out info looks like this. It shows on email, but in backend everything is empty. On email the description section is missing. https://imgur.com/a/YShwriP

Why is this happening?

Thanks

Hi

It looks like there may be an issue retrieving the entry data from the database. Would it be possible for me to get some temporary admin access to your WordPress Dashboard in order to help investigate this issue further for you? If so, please create a user with the “Administrator” role and send a message through the contact form on our CodeCanyon profile page with the username, password and site URL. Thanks!

Regards, TC

I sent you access to the contact form, thanks

Hi, can I have for the same fields multiples entries? For ex. we have an RFQ and I want to let users add more than one product in theyr RFQ

1 product with 600×400 x 400 1 product with 600×400 x 300 1 product with 500×300 x 200

Hi

Please try one of these guides:

Duplicating a text field in the form

Repeatable groups

Regards, TC

thank you for your fast reply! i will give it a try.

Copied form to my new website with new design, how can the form get the new style?

Hi

If you go to Edit Form – Settings – Style and choose Theme: None, the form should inherit styling from the WP theme if it is set up to style generic inputs without CSS classes.

Otherwise you might need to add a class to the fields (in the field settings on the Styles tab), choose a different form theme, or add your own styling at Edit Form – Settings – Style.

Regards, TC

hi, how do i deregister my license key and move it to another site?

Hi

You can simply register the key on the other site, it will be associated with this new site and will become unlicensed on the old site after some time.

Regards, TC

Hi, we use your great Quform plugin to apply for trainings. There is a field “trainings” with prdefined values: course1, course2, course3 … course16 We would like to allow a maximum of 7 people to apply for each course session.

I see, there is “Prevent Dulicates” option in Advanced / Validators. Is there a similar solution to prevent more than 7 applying for the same course?

thanks Tibor

Hi, is there any options to show somewhere after Form Name, how many places are free from Entry Limit?

thanks cstibi

Hi

You can use the shortcode [quform_entries_remaining id="1"] where the number 1 is the form ID.

Regards, TC

Thank You!

by
by
by
by
by
by

Tell us what you think!

We'd like to ask you a few questions to help improve CodeCanyon.

Sure, take me to the survey