Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Is there a way to validate customer input?

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › Is there a way to validate customer input?

Tagged: collect customer input

  • This topic has 4 replies, 2 voices, and was last updated 11 years, 3 months ago by admin.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • January 22, 2014 at 9:29 pm #10469
    ed4becky
    Member

    I don’t have a very sophisticated upgrade regime; I have offered users with a current license code to upgrade for a reduced price. However the program will not be able to validate if a current version exists.

    I would like to use the ‘collect customer input’ field to have the user input the old code before I give them the new one. I have read up on how to make the field mandatory – my question is is there a way to validate the input before going to Paypal?

    January 23, 2014 at 12:48 am #60450
    admin
    Keymaster

    The collect customer input field is just a free form text field. Different users use that field for different purpose so we can’t apply a validation that works for everyone. If you have some specific validation that you want to apply to your site then we will have to do a custom job.

    https://support.tipsandtricks-hq.com/need-custom-work-done

    January 24, 2014 at 1:21 am #60451
    ed4becky
    Member

    I understand, I was looking more for a ‘has anyone done this’ sorta thing, or ‘are there any hooks’.

    January 24, 2014 at 4:21 pm #60452
    ed4becky
    Member

    I made the change to requite customer input:

    if (val.length != 0)

    {

    val = val.replace(“(“,”[“);

    val = val.replace(“)”,”]”);

    val_combo = val_combo + ” (” + val + “)”;

    <validate here?>

    } else {

    alert(“Please include your v1 License key”);

    return false;

    }

    Is my requirement met simply by adding a database query to validate the input and return false if its not valid?

    January 24, 2014 at 11:04 pm #60453
    admin
    Keymaster

    Yep. The above code is in JavaSript though so to do the database query you will need to use AJAX there.

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ