nimafire Posted February 27, 2018 Share Posted February 27, 2018 Hello how can i add additional fields when customer try to register domain ? like a check box for .xyz domain with this text : "ive confirm that read this link before register" and point to url and customer have to check this before next step Link to comment Share on other sites More sharing options...
brian! Posted February 27, 2018 Share Posted February 27, 2018 https://docs.whmcs.com/Additional_Domain_Fields Quote Additional domain fields (also commonly referred to as Extended Attributes) define the information required by domain registries for a given TLD. When a domain registry requires the information, a domain name will fail to register successfully unless the values are provided. Typical information requested by domain registries include things such as Registrant Legal Type, Registered Entity Name, etc.. for you, it would be along the lines of.. $additionaldomainfields[".xyz"][] = array("Name" => "Terms Confirm", "LangVar" => "xyzterms", "Type" => "tickbox", "Description" => "I confirm that I have read this <a href=\"https://www.google.com\">link</a> before registering", "Required" => true); 2 Link to comment Share on other sites More sharing options...
MaikelVE Posted February 27, 2018 Share Posted February 27, 2018 Hi! Is there an option to set a value option to predefine a textbox like example: "Value" => "This is something", Link to comment Share on other sites More sharing options...
brian! Posted February 28, 2018 Share Posted February 28, 2018 16 hours ago, MaikelVE said: Hi! Is there an option to set a value option to predefine a textbox. yes, you use a "Default" value. $additionaldomainfields[".xyz"][] = array("Name" => "Terms Confirm", "LangVar" => "xyzterms", "Type" => "text", "Size" => "20", "Default" => "Brian222", "Required" => true); 1 Link to comment Share on other sites More sharing options...
nimafire Posted March 1, 2018 Author Share Posted March 1, 2018 is there an option to add field for all tlds? Link to comment Share on other sites More sharing options...
brian! Posted March 1, 2018 Share Posted March 1, 2018 1 hour ago, nimafire said: is there an option to add field for all tlds? not in the sense of using wildcards (AFAIK) - the work around would be to create a custom entry and link each of the TLDs to use it... <?php $additionaldomainfields['custom'][] = array( "Name" => "Free Email Address #1", "Type" => "text", "Size" => "30", ); $additionaldomainfields['.co.uk'] = $additionaldomainfields['custom']; $additionaldomainfields['.com'] = $additionaldomainfields['custom']; so in the above example, i've created a custom field that won't be used by any TLD - but then i've assigned .co.uk and .com to use the custom field... so registrations of those two TLDs will use it, other TLDs won't.... then it's a case of adding each TLD you want to use the custom field(s) as i've done for .co.uk and .com Link to comment Share on other sites More sharing options...
Recommended Posts