Setting Default Rich Text Containt Based on Dropdown Value in Mendix
0
In Mendix, I have an enumeration with three values: Car, Bike, and Bicycle. When a user initiates a new purchase, these options are displayed in a dropdown menu. However, I use the same page to handle repairs for previously purchased items, and in that context, I want the dropdown to automatically preselect the correct value based on where the user navigated from—for example, if the user comes from the Bike page, the dropdown should default to Bike. To achieve this, I can pass the selected vehicle type as a page parameter or use a microflow to initialize the object with the appropriate default value before loading the page. Additionally, I have a Rich Text widget on the same page to accept messages from the user. I want this widget to display default content when the page loads, so the user sees a predefined message in the editor. This can be done by setting a default value for the corresponding string attribute in the microflow that initializes the page object, ensuring the Rich Text widget is bound to that attribute so the content appears immediately on the frontend.
asked
Vaibhav Ganjave
1 answers
0
Hello Vaibhav ;)
Interesting use-case. I think you can achieve it based on the Events widget. You can add this widget on your 2 different pages and based on which page you are you will use a different microflow / nanoflow for the page loading event. If you're on the Bike page you change the enum value to Bike and you can also change the rich text default value to your desired starting template. Hope this helps ;)