2015-01-30 4 views
-1

저는 Wordpress 초보자이고 난처한 상황입니다. 나는 플러그인을 찾기 위해 구글에 도움을 청하려고 애썼다. 나는 성공하지 못했습니다.라디오 버튼이있는 Wordpress 새 등록 양식

회원 또는 공급 업체의 두 가지 선택 항목을 만들고 싶습니다. 선택에 따라 등록시 완료되면 이메일을 보냅니다.

그래서 회원을 선택하면, 그것은 [email protected]으로 이메일을 보내거나 그들이 공급 업체을 선택하면, [email protected]가 제출됩니다.

누군가 제발 나를 도와 줄 수 있습니까?

답변

0

이 선택을 추가하는 등록 양식이있을 것입니다

//form starts 
//other fields 

    <input type = "radio" name = "user_role" value = "Member">Member</input> 
    <input type = "radio" name = "user_role" value = "Vendor">Vendor</input> 

//submit 

//on submit 

    if(isset($_POST['user_role'])){ 
     //Here check value selected from both choices 
     if($_POST['user_role'] == "Member"){ 
      $email_id = "[email protected]"; 
     } 
     else{ 
      $email_id = "[email protected]"; 
     } 
     //send email 
    } 
관련 문제