milogcsetc
Forum Replies Created
-
Forum: Plugins
In reply to: [Gravity PDF] Correct syntax for pullingcheck box data?Figured it out! In case anyone ever has this problem too, this is how I did it:
<table><tbody> <?php foreach ($form_data['products'] as $product) { ?> <?php foreach ($product['options'] as $option) { ?> <!-- add your checkbox rows --> <?php if (($option['field_label'] == 'name of your pricing checkbox field here') && (substr($option['option_name'], 0, 15) == 'the first 15 digits of the label of your first checkbox in this field')) { ?> <tr><td>1</td><td>2</td><td>3</td></tr> <?php } ?> <?php if (($option['field_label'] == 'name of your pricing checkbox field here') && (substr($option['option_name'], 0, 15) == 'the first 15 digits of the label of your second checkbox in this field')) { ?> <tr><td>4</td><td>5</td><td>6, etc.</td></tr> <?php } ?> <?php } ?> <?php } ?> <!-- while we're here, this is how I added pricing radio buttons --> <?php if (substr($form_data['field'][47], 0, 7) == 'first seven digits of the first button value in field 47') { ?> <tr><td>1</td><td>2</td><td> 3</td></tr><?php } ; ?> <?php if (substr($form_data['field'][47], 0, 7) == 'first seven digits of the first button value in field 47') { ?> <tr><td>4</td><td>5</td><td>3</td></tr> <?php } ; ?> <tbody></table>
Forum: Plugins
In reply to: [Gravity PDF] Correct syntax for pullingcheck box data?Oh, that makes sense! I couldn’t find much about the products key — should there more to it than replacing field with products in the coding above? Because I couldn’t get any of them to print. Sorry for being such a pain.
<?php if ( in_array( 'APX-AMC: Advanced', $form_data['products'][109] ) ) { ?><tr><td>1</td><td>APX-AMC</td><td>Advanced</td><td>$100</td><td>$100</td></tr><?php }; ?>
Forum: Plugins
In reply to: [Gravity PDF] Correct syntax for pullingcheck box data?AMC is visible when I look at my test invoice’s PDF in the default view, and the wp_rg_lead_detail record for the entry lists the option as “109.1” and “APX-AMC: Advanced|100”
Should the price be included in
in_array( '',
? Am I looking in the wrong place for the correct field names and values?Forum: Plugins
In reply to: [Gravity PDF] Correct syntax for pullingcheck box data?I ran &data=1, and the only mention of this field was just
[109] =>
Only two of my checkbox field options have text after the “=>”
Forum: Plugins
In reply to: [Gravity PDF] Correct syntax for pullingcheck box data?Thanks! Unfortunately, neither method worked for me. I might be mangling code somewhere:
<?php if ( in_array( 'APX-AMC: Advanced', $form_data['field'][109] ) ) { ?><tr><td>1</td><td>APX-AMC</td><td>Advanced</td><td>$100</td><td>$100</td></tr><?php }; ?>
Although I may not be getting the value correct — I don’t see how as I’m copying it directly from the field in wp_rg_lead_detail — when I make it a negative statement then the html appears:
<?php if ( ! in_array( 'APX-AMC: Advanced', $form_data['field'][109] ) ) { ?><tr><td>1</td><td>APX-AMC</td><td>Advanced</td><td>$0</td><td>$0</td></tr><?php }; ?>
That fixed it — thanks!
I’m using ▲ for active and ▼ for inactive with a menu depth of three, although I just tried the other depths and nothing worked for getting the arrows back. Thanks for looking into this!