Evgeny Posted February 13, 2023 Share Posted February 13, 2023 (edited) How to show fields depending on the type of domain registration ($tldmyname_type), for an individual or for a company. If the type of individual is selected, then display the fields for individuals and same if select company (show only fields for company): $tldmyname_type = array ( 'IND' => 'Personal', 'ORG' => 'Company' ); $additionaldomainfields['.tld'][] = array('Name' => 'Type', "LangVar" => "domain_type_register", 'Type' => 'dropdown', 'Options' => join($tldmyname_type,','), 'Required' => true); $additionaldomainfields['.tld'][] = array('Name' => 'LastName', "LangVar" => "domain_lastname", 'Type' => 'text', 'Size' => '20'); $additionaldomainfields['.tld'][] = array('Name' => 'Birthday', "LangVar" => "domain_birthday", 'Type' => 'text', 'Size' => '10'); $additionaldomainfields['.tld'][] = array('Name' => 'Passport', "LangVar" => "domain_passport_number", 'Type' => 'text', 'Size' => '20'); $additionaldomainfields['.tld'][] = array('Name' => '','Description' => '<center><br/><b>For Company</b></center>'); $additionaldomainfields['.tld'][] = array('Name' => 'Company_name', "LangVar" => "domain_company_name", 'Type' => 'text'); $additionaldomainfields['.tld'][] = array('Name' => 'Company_id', "LangVar" => "domain_company_id", 'Type' => 'text'); This will also allow me to make required fields, since this is currently not possible and in general it will be more convenient. Edited February 13, 2023 by Evgeny 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.