Webmaster001 Posted September 27, 2013 Share Posted September 27, 2013 Hi, In the ajax orderform how can we disable the dropdown and assign a "demo" value. We did the following <!--{if $loggedin}{$clientsdetails.country}{else}<input type="hidden" name="country" style="width:40%;" value="demo" />{/if} --> <!--<tr class="rowcolor1"><td class="fieldlabel">{$LANG.clientareacountry}</td><td class="fieldarea"><input type="text" name="domaincontactcountry" size="15" value="{$domaincontact.country}" /></td></tr> And we have commented (disabled) the dropdown lines however we are still seeing the following error: "Please choose your country from the drop down box" 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 27, 2013 Share Posted September 27, 2013 I don't know if this will help, but the list of countries in the drop down list can be edited in includes -> countries.php so you could remove them all and add "demo" if that is what you want... btw - do you realise that you've commented out the hidden field in the first line, and not ended the comment in the second ? also, $domaincontact.country doesn't exist in the current ajax form. i'm not sure what you're trying to achieve with this, but wouldn't it be easier to add a custom field rather than mess around with the country dropdown ? 0 Quote Link to comment Share on other sites More sharing options...
Webmaster001 Posted September 27, 2013 Author Share Posted September 27, 2013 I don't know if this will help, but the list of countries in the drop down list can be edited in includes -> countries.php so you could remove them all and add "demo" if that is what you want... btw - do you realise that you've commented out the hidden field in the first line, and not ended the comment in the second ? also, $domaincontact.country doesn't exist in the current ajax form. i'm not sure what you're trying to achieve with this, but wouldn't it be easier to add a custom field rather than mess around with the country dropdown ? Thanks for your help. For our product we do not care for clients address so we just want to assign a demo value to it and hide it from the checkout form so the client even doesn't have to fill that. However regardless of what we do we keep seeing the same error of Please choose your country from the drop down box I have removed the commented line and however we keep receiving the error . Any suggestion? Thanks 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted September 28, 2013 Share Posted September 28, 2013 I have removed the commented line and however we keep receiving the error . Any suggestion? well you could hide the dropdown by using the following... <tr class="rowcolor1 signupfields" style="display:none;"><td class="fieldlabel">{$LANG.clientareacountry}</td><td class="fieldarea">{if $loggedin}{$clientsdetails.country}{else}{$clientcountrydropdown}{/if}</td></tr> that should allow the form to work without throwing up the error message you previously saw. if you still need to pass the value "demo" (or similar) in a field, you're probably better off using a custom field (and perhaps hiding it). 0 Quote Link to comment Share on other sites More sharing options...
Webmaster001 Posted September 28, 2013 Author Share Posted September 28, 2013 It seems there is some sort of javascript that keeps pushing the field to be filled by a dropdown menu. We did actually commented out and removed the line you recommended but still we see the issue! Perhaps this is being pushed by another code or script. Any suggestion? 0 Quote Link to comment Share on other sites More sharing options...
Webmaster001 Posted September 29, 2013 Author Share Posted September 29, 2013 well you could hide the dropdown by using the following... that should allow the form to work without throwing up the error message you previously saw. if you still need to pass the value "demo" (or similar) in a field, you're probably better off using a custom field (and perhaps hiding it). Ok, so finally I have resolved it. The problem was the "Template Cache". I deleted all files in the /whmcs/template_c It seems the code was not getting updated so the original solution was fine and we finally could assign a demo value to the country. 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.