settings->contactFormId); if (!$form) return null; $formData = $form->moduleSettings; $code = '
container_id) { $code .= ' id="' . e($widget->container_id).'"'; } $code .= '>'; $code .= "

".e($formData['companyName']).'

'; $code .= nl2br($formData['address']); $code .= "
"; return $code; } /** * Display form for creating new instance of widget * * @param WidgetType $type * * @return mixed */ public static function renderAddForm(WidgetType $type) { $contactForms = Content::where('moduleHandler', config('contactform.handler')) ->get(); return view('contactform::admin.widgets.address.new', [ 'type' => $type, 'widget' => new Widget(), 'forms' => $contactForms ]); } /** * Display form for editing already existing widget * * @param Widget $widget * * @return mixed */ public static function renderEditForm(Widget $widget) { $contactForms = Content::where('moduleHandler', config('contactform.handler')) ->get(); return view('contactform::admin.widgets.address.edit', [ 'widget' => $widget, 'forms' => $contactForms ]); } }