Skip to content

Commit b308ad4

Browse files
authored
Merge pull request #110 from BoldGrid/issue-108
Radio button creates line items in Sprouts Fixes #108
2 parents a4d7b91 + 54cc446 commit b308ad4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

includes/integrations/sprout-invoices/class-integration-sprout-invoices.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,12 @@ public function create_doc($entry_id, $form_id, $page_id)
104104
// bail out if nothing found to be replaced
105105
if ( $line_item_data ) {
106106

107-
$li = " ";
107+
$fieldSlug = $match[1];
108+
$lineItemsSelected = is_array( $_REQUEST[$match[1]] ) ? $_REQUEST[$match[1]] : array($_REQUEST[$match[1]]);
109+
110+
// was anything even selected?
111+
if (is_array( $lineItemsSelected )) {
112+
108113

109114
foreach($matches[0] as $fieldSlug ){
110115
$form_fields = weforms()->form->get( $form_id )->get_fields();

0 commit comments

Comments
 (0)