• Resolved rmp84

    (@rmp84)


    I created a repeater with 3 fields. When Smart Forms generates the email following submission, the results appear as just an unbroken list which is difficult to read. Is it possible to make each response a separate bullet, or at least place a space between each set of results.

    Right now it looks like:
    Question #1:Stuff
    Date #1:04/01/2019
    Price #1:$0.00
    Question #2:More stuff
    Date #2:04/02/2019
    Price #2:$0.00
    Question #3:Yet more stuff
    Date #3:04/03/2019
    Price #3:$0.00

    Is it possible to break it into say:
    Question #1: Stuff
    Date #1: 04/01/2019
    Price #1: $0.00

    Question #2: More stuff
    Date #2: etc..

    Thank you!

Viewing 1 replies (of 1 total)
  • Plugin Author EDGARROJAS

    (@edgarrojas)

    Hello!

    The only way this could be possible is to tweak the plugin, i think something like this would add an space between each entry:

    Open the file smart-forms\string_renderer\rednao_repeater_renderer.php and change this:

     for($i=0;$i<count($values);$i++)
            {
                $row=$values[$i];
                foreach($row as $columnName=>$columnValue)
                {
                    $fieldName=str_replace('_row_'.$i,'',$columnName);
                    $fieldOptions=$this->GetFieldById($formElement['FieldOptions'],$fieldName);
                    if($fieldOptions==null)
                        continue;
    
                    $value=$stringBuilder->GetStringFromColumn($fieldOptions,$columnValue);
                    if(trim($value)=='')
                        continue;
    
                    $label=$fieldOptions['Label'];
                    if($IncludeItemNumber)
                        $label.=' #'.($i+1);
                    $text.="<strong>".htmlspecialchars($label).":</strong> ".$value."<br/>";
                }
    
            }

    for this:

     for($i=0;$i<count($values);$i++)
            {
                $row=$values[$i];
                foreach($row as $columnName=>$columnValue)
                {
                    $fieldName=str_replace('_row_'.$i,'',$columnName);
                    $fieldOptions=$this->GetFieldById($formElement['FieldOptions'],$fieldName);
                    if($fieldOptions==null)
                        continue;
    
                    $value=$stringBuilder->GetStringFromColumn($fieldOptions,$columnValue);
                    if(trim($value)=='')
                        continue;
    
                    $label=$fieldOptions['Label'];
                    if($IncludeItemNumber)
                        $label.=' #'.($i+1);
                    $text.="<strong>".htmlspecialchars($label).":</strong> ".$value."<br/>";
                }
               $text.="<br/>";
    
            }
Viewing 1 replies (of 1 total)
  • The topic ‘Repeater Results’ is closed to new replies.