sixgweb / forms-plugin

MIT License
2 stars 2 forks source link

Frontend field styling #1

Open envas opened 4 days ago

envas commented 4 days ago

Can you please offer some instructions on how to style the frontend fields? We don't use Bootstrap but Tailwind and all your components are styled using Bootstrap.

sixgweb commented 3 days ago

Hi envas,

If you're wanting instructions on styling with bootstrap... Please refer to the docs

If you're wanting to override the HTML output... Attributize exposes backend form fields/widgets on the frontend, which are all built with Bootstrap 5 markup in Modules\Backend\Widgets\Form\Partials and Modules\Backend\FormWidgets\xxx\Partials. This is why Bootstrap 5.x is a requirement for Attributize.

It's possible to override the markup with your own extension, using OCMS's addViewPath, but this will be quite a bit of work. You will need overrides for the Form partials and each FormWidget partials. This can be done via addViewPath in a custom plugin like this...

FormWidget::extend(function ($formWidget) {
    $formWidget->addViewPath(plugins_path() . '/YOUR/PLUGINNAME/partials/form');
});

//You'll need to do this for every formwidget you want to override
\Backend\FormWidgets\Repeater::extend(function ($formWidget) {
    $formWidget->addViewPath(plugins_path() . '/YOUR/PLUGINNAME/partials/form/repeater');
});

You'll then need to copy/paste the files from Modules\Backend\Widgets\Form\Partials_xxx.php to /plugins/your/pluginname/partials/form/_xxx.php and make your changes.

Rinse and repeat for each formwidget.

envas commented 3 days ago

Thank you, of course, I won't do this, it's too much work. It will be easier to write a fully new plugin for my forms or to use some other plugin for frontend forms. The fact that Bootstrap is required to work with your plugin, should be highlighted in the Marketplace overview. I found the only official mention here, and it's for the Attributize plugin, not Forms. Of course, I didn't study the documentation that closely before buying it. I could have saved 60 USD, this way your product is useless for me.

sixgweb commented 3 days ago

Hey envas, sorry this won't work out for you. Attributize states the requirements in the Requirements section of the plugin page

Please feel free to reach out to the OCMS team about a refund as the funds are not available on my end.

envas commented 3 days ago

Please add the requirement to the Forms plugin too! Not all users are going to study the requirements of the dependencies. When I saw Frontend/Backend Form Builder, I thought that is what I need. I didn't check the dependencies.

envas commented 3 days ago

And think about the possibility of a demo version that could prevent such misunderstandings.

sixgweb commented 3 days ago

Please add the requirement to the Forms plugin too! Not all users are going to study the requirements of the dependencies. When I saw Frontend/Backend Form Builder, I thought that is what I need. I didn't check the dependencies.

I've updated the documentation, marketplace plugin page and the plugin readme to address your request. Hopefully, this prevents future confusion.

And think about the possibility of a demo version that could prevent such misunderstandings.

Thanks for your recommendation; I'll consider this for 2025. Hopefully, the demonstration website, youtube videos and documentation will suffice for current/potential users.

I'm happy to refund your purchase, once the funds are deposited to my account. In the meantime, OCMS has your funds and they might be able to get you your refund faster.

envas commented 3 days ago

I contacted OCMS, thank you for your support.