Gizra / drupal-starter

Drupal 10 Starter with best practices
76 stars 40 forks source link

Issue-726: Theming the default contact form. #753

Closed sonvir249 closed 21 hours ago

sonvir249 commented 1 week ago

Closes #726

Contact form after styling: image

sonvir249 commented 1 week ago

First time tried hands on CSS 🙈, please do let me know if any changes needed. I am here to learn and grow.

amitaibu commented 1 week ago

Thanks. Let's see if we can avoid special-casing the Contact form. In fact, I think we should remove this Contact form and replace it with integration with Webform.

@mgurjanov I think you have done something like this in the past -- allowing embedding webforms inside Langing pages. Would you mind giving some poonters?

mgurjanov commented 1 week ago

@amitaibu Yes I did implement this. I installed webform, created Paragraph type that allows referencing Webforms and I wired and styled this paragraph. There is also common styling for all such webforms that gets applied to any paragraph webform. This paragraph can then be enabled on Landing page CT. It was a bit larger PR but most of the files are originating from enabling Webform module. So, there is PEVB plugin and there is buildWebformEmbed() within FormsEmbedTrait and finally form.pcss. I also had optional Title and Description fields that could be rendered with the webform. Of course there are some config options for Webform itself and permissions etc.

amitaibu commented 1 week ago

@mgurjanov Seems we've already solved most of it already, so maybe you'd like to tackle it?

@sonvir249 you could help with the review! 🙏

mgurjanov commented 1 week ago

@amitaibu Yes I will work on it. I assigned the issue to myself.

sonvir249 commented 21 hours ago

Closing this PR in favour of #759 cc: @amitaibu @mgurjanov