mediadave Posted August 26, 2013 Share Posted August 26, 2013 I would like to add a custom field on my order form for a subdomain. I can easily add the field under "Custom Fields" for the product. However is there a way I can make it so if someone has already chosen the name it will inform them the name has already been chosen? I'm going to manually register the subdomain myself and I would just need the field to check and see if anyone else currently has that name in WHMCS. I have already tried the "Subdomain Options" here: http://docs.whmcs.com/Products_and_Services#Other and this does not do what I am looking for. 0 Quote Link to comment Share on other sites More sharing options...
mediadave Posted August 28, 2013 Author Share Posted August 28, 2013 Is there another section on the forums where this should be posted? Or is there another site or forum where I would get an answer to this? 0 Quote Link to comment Share on other sites More sharing options...
mediadave Posted September 5, 2013 Author Share Posted September 5, 2013 Just wondering if it is possible to get any answers or direction on this? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 6, 2013 Share Posted September 6, 2013 (edited) there are probably a couple of ways to do this, but the one without coding or making template modification would be to use the following line in the regex validation of your custom field. /^(?i)(?!.*\bdog\b)(?!.*\bcat\b).*$/ this will check the info entered into the custom field against either "dog" or "cat" - if it matches (case ignored), it displays the error below... if it doesn't match, the field is accepted... while 'dog' would be invalid, 'dogs' would be fine. *custom field* value is not valid "value is not valid" can be edited in the language files. obviously, as you manually setup a valid subdomain order, you should add the subdomain to the above validation code too. Edited September 6, 2013 by brian! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.