Hi all, I am still new to xblock. There is a xblock video demo which shows that the user press the edit button, a form pops up and allows the user to configure the URL and stuff. Upon seeing the code, there is too much information for me to modify to the desired outcome. Default xblock examples didn’t cover this part as well. Hence I am asking is there a simpler example/code for me to allow user to enter the form upon entering the details show what he/she has entered?
For basic configuration functionality, you can use
StudioEditableXBlockMixin which will auto-generate a working configuration form for you.
You can see examples of its use in the LTI XBlock as well as problem builder. (Basically, you need to declare a list of
editable_field_names and you can optionally set options for advanced customization of specific fields - like this which sets the list of values for a
select element. Options include
If that doesn’t cover your use cases, you’ll need to create your own editor form, and you can copy the example of almost any XBlock that doesn’t use