Hello,
I’m sorry, the current version of the plugin does not include this information in the exported CSV files, only if the entry was paid or not, however I agree that the payment option used by the user can be very useful in different case, and I will include it in the CSV files in a next update of the plugin.
About managing the payment option through the equations, this field is not part of the structure of the form, so, you should manage it with javascript. For example, the following equation ticks by default the “Pay with PayPal” option:
(function(){
jQuery('[name="bccf_payment_option_paypal"][value="1"]').prop('checked', true);
})()
and the following one ticks the “Pay Later” option:
(function(){
jQuery('[name="bccf_payment_option_paypal"][value="0"]').prop('checked', true);
})()
Another situation.
If your current equation is for example: fieldname1+fieldname2
, but you want increase the result in a 10% if the user select the “Pay with PayPal” option.
– Insert a “Hidden” field in the form (I’ll call it fieldname3
) with zero (0) as the predefined value.
– Modify the equation as follows:
(fieldname1+fieldname2)*(1+fieldname3*0.1)
– Finally, insert a “HTML Content” field in the form with the following piece of code as its content:
<script>
jQuery(document).on('change', '[name="bccf_payment_option_paypal"]', function(){
var v = (this.value == 1) ? 1 : 0;
jQuery('[id*="fieldname3_"]').val(v).change();
});
</script>
and that’s all.
Best regards.