| @@ -4,12 +4,17 @@ | ||
| 4 | 4 | use IvyForms\Services\Shortcode\ShortcodeService; |
| 5 | 5 | |
| 6 | 6 | /** @var int $counter */ |
| 7 | 7 | $form = ShortcodeService::$formList[$counter]; |
| 8 | +$formId = $form['id'] ?? 0; | |
| 9 | +$customCssClass = ''; | |
| 10 | +if (!empty($form['form']['styleSettings']['customCssClass'])) { | |
| 11 | + $customCssClass = ' ' . esc_attr($form['form']['styleSettings']['customCssClass']); | |
| 12 | +} | |
| 8 | 13 | ?> |
| 9 | 14 | |
| 10 | 15 | <div id="ivyforms-app-<?php echo esc_attr($counter) ?>" |
| 11 | - class="ivyforms ivyforms-frontend" | |
| 16 | + class="ivyforms ivyforms-frontend ivyforms-form-<?php echo esc_attr($formId) ?> ivyforms-form-wrapper-<?php echo esc_attr($formId) ?><?php echo $customCssClass ?>" | |
| 12 | 17 | data-counter="<?php echo esc_attr($counter) ?>" |
| 13 | 18 | data-post-id="<?php echo esc_attr(get_the_ID()); ?>" |
| 14 | 19 | data-referer-url="<?php echo esc_attr(wp_get_referer() ?: ''); ?>" |
| 15 | 20 | > |