Web Programming/In Los Angeles

Ultimate member_Forms

Jacob93 2018. 4. 22. 07:12


Ultimate member 에 보면 Forms 를 설정하는 부분이 있다.


이 부분은 실제 Form을 내 마음대로 설정할 수 있는 탭이다.



Registration / Login / Profile 세개의 Form을 따로 만들었다.


먼저 Registration Form을 보면 주의해야 할 사항이 있다.



영역을 나눠서 Information , Login Information , Billing Address , Shipping Address 를 Divider로 나눴


다. 나누고 그 밑에 여러가지 가입할 때 필요한 정보들을 넣었다.


여기서 주의할 점 Meta KEY를 입력할 때 Wordpress 자체에 입력되어있는 Meta Key를 입력해야 


데이터베이스가 연결 되어서 회원가입을 했을때 Wordpress에서 저장이 된다.



Here’s a full list of fields in the array passed to woocommerce_checkout_fields:

  • Billing
    • billing_first_name
    • billing_last_name
    • billing_company
    • billing_address_1
    • billing_address_2
    • billing_city
    • billing_postcode
    • billing_country
    • billing_state
    • billing_email
    • billing_phone
  • Shipping
    • shipping_first_name
    • shipping_last_name
    • shipping_company
    • shipping_address_1
    • shipping_address_2
    • shipping_city
    • shipping_postcode
    • shipping_country
    • shipping_state
  • Account
    • account_username
    • account_password
    • account_password-2
  • Order
    • order_comments

출처 : https://docs.woocommerce.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/


Meta Key를 잘 맞춰서 Form을 만들어야 저장이 원하는 대로 잘 된다.


Registration Form만들때 Meta key를 맞추는 부분만 잘 한다면 다른 부분들은 쉽게 만들 수 있다.