サポート » プラグイン » contact form7に出力した結果を入力したいです

  • popcorndesign

    (@popcorndesign)


    こんにちは。
    いつも壁にぶち当たると質問させて頂いております。
    下記に詳細を記載致しますので、どなたかお力を貸してください(;_;)

    現在よくあるチラシ印刷のテーブルをPHPで作り、出力しています。
    出力した金額に、お問い合わせフォームへのリンクを貼るまでは成功していますが、
    リンクをクリックした際に、例えば、
    「A4チラシ 片面フルカラー 1,000部 6日納期 10,000円」
    といったように、お問い合わせフォームへ出力して表示したいです。

    http://ja.forums.wordpress.org/topic/3380?replies=11
    こちらのフォーラムを参考に、ある程度までは成功したのですが、
    その先が難しいです。

    function.phpに追加したコード

    function my_form_tag_filter($tag){
      if ( ! is_array( $tag ) )
      return $tag;
    
      if(isset($_GET['price'])){
        $name = $tag['name'];
        if($name == 'price')
          $tag['values'] = (array) $_GET['price'];
      }
      return $tag;
    }
    add_filter('wpcf7_form_tag', 'my_form_tag_filter', 11);

    現在のコード

    <table width="100%" class="a">
    	<tr>
    		<th>部数</th>
    		<th style="width:22%;">片面モノクロ<br />
    		<img src="<?php bloginfo('template_directory'); ?>/img/chirashi/coloricon1.gif"/></th>
    		<th style="width:22%;">片面フルカラー<br />
    		<img src="<?php bloginfo('template_directory'); ?>/img/chirashi/coloricon4.gif"/></th>
    		<th style="width:22%;">片面フルカラー/片面モノクロ<br />
    		<img src="<?php bloginfo('template_directory'); ?>/img/chirashi/coloricon4.gif"/><img src="<?php bloginfo('template_directory'); ?>/img/chirashi/coloricon1.gif"/></th>
    		<th style="width:22%;">両面フルカラー<br />
    		<img src="<?php bloginfo('template_directory'); ?>/img/chirashi/coloricon4.gif"/><img src="<?php bloginfo('template_directory'); ?>/img/chirashi/coloricon4.gif"/></th>
    	</tr>
    
    	<?php
    	$busuu = 0;
    	$Link_URL = "<a href=\http://popcorn-design.com/estimate?price=$num\>";
    
    	for ( $num = 16000; $num <= 163000; $num = $num + 3000) {
    		$busuu = $busuu + 1000;
    		$num2 = $num + 2000;
    		$num3 = $num + 4000;
    		$num4 = $num + 7000;
    
    		echo '<tr>';
    		echo '<th>' , $busuu,'</th>';
    		echo '<td>', $Link_URL , $num ,'</a>'. '</td>' ;
    		echo '<td>', $Link_URL , $num2 ,'</a>'. '</td>' ;
    		echo '<td>', $Link_URL , $num3 ,'</a>'. '</td>' ;
    		echo '<td>', $Link_URL , $num4 ,'</a>'. '</td>' ;
    		echo '</tr>';
    		echo '</tr>';
    	}
    	?>
    	</table>

    以上が現在の状況でございます。
    どなたか詳しい方、お力をお貸しください。

    宜しくお願い申し上げます。

  • トピック「contact form7に出力した結果を入力したいです」には新たに返信することはできません。