I am a newbie with octobercms and have some little issues with the builder-plugin. Maybe one of you can help me or give me a tip on how to implement this:
I created with RainLab.Builder a backend form where my customers editors simply add news to the site. Unfortunately there's no opinion to prevent leaving the form without saving. is it possible to show a simple modal?
I have two datetime fields. The date of publication is entered in the first, the end date of publication in the second. Now i want that the "min-date value" of the second field gets the date of the first field.
Finally i have a textarea where i want to get the "exact" data via the preset-function from a richeditor field. That work perfect with textarea to textarea. I think the problem are the HTML-tags in the richeditor. Is it possible to filter them out?
With a few tips you would help me a lot. Gladly only on individual issues.
Greetings from rainy and freezing cold Germany
Hi, welcome to October CMS, these are good questions that will require some exploration on your part. I will do my best to offer some high level guidance.
For the first point, you can use the input monitor plugin, by attaching this to the form
<form data-change-monitor data-window-close-confirm="There is unsaved data" > ... </form>
For the second point, research the
filterFields method and
dependsOn definition in documentation to manipulate the field datetime field values. Ideally you want the second field to depend on the first field, so when the first field changes, it manipulates the minimum date of the second, it can even pre-fill the value this way.
Finally, I would suggest looking at other plugins to achieve the desired result, this is a great way to learn. The Test plugin offers a wide array of use cases and would even be useful in describing your requirements more clearly.
Thanks a lot for the great tips on my two first points and the tip with the Test plugin. Didn't know that before. :-)
The text area should contain the og-description based on maybe the first 100 characters of the rich editor. It should be automatically get the text, but the user should still be able to edit the og-description. But of course it´s necessary to remove all HTML...
Maybe a screenshot describes it better: https://snipboard.io/zGicZQ.jpg
Thanks again for the great guidance!
1-3 of 3