Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Get question and type Q1
- if (get_post_meta($post->ID, '_cmeta_contest_q1_type', true) !== 'field') {
- $cq1 = "type='radio' options='". get_post_meta($post->ID, '_cmeta_contest_q1_radio', true) ."'";
- } else {
- $cq1 = "type='text'";
- }
- $question1 = get_post_meta($post->ID, '_cmeta_contest_q1', true);
- // Get question and type Q2
- if (get_post_meta($post->ID, '_cmeta_contest_q2_type', true) !== 'field') {
- $cq2 = "type='radio' options='". get_post_meta($post->ID, '_cmeta_contest_q2_radio', true) ."'";
- } else {
- $cq2 = "type='text'";
- }
- $question2 = get_post_meta($post->ID, '_cmeta_contest_q2', true);
- // Get question and type Q3
- if (get_post_meta($post->ID, '_cmeta_contest_q3_type', true) !== 'field') {
- $cq3 = "type='radio' options='". get_post_meta($post->ID, '_cmeta_contest_q3_radio', true) ."'";
- } else {
- $cq3 = "type='text'";
- }
- $question3 = get_post_meta($post->ID, '_cmeta_contest_q3', true);
- // Get contest form title
- $contest_title = the_title_attribute( 'echo=0' );
- echo do_shortcode("
- [contact-form to='s@ve.me' subject='". $contest_title ."']
- [contact-field label='". $question1 ."' ". $cq1 ." required='1'/]
- [contact-field label='". $question2 ."' ". $cq2 ." required='1'/]
- [contact-field label='". $question3 ."' ". $cq3 ." required='1'/]
- [contact-field label='Namn och adress' type='textarea' required='1'/]
- [contact-field label='E-postadress' type='email' required='1'/]
- [/contact-form]
- ")
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement