Further customizability in forms utilizing IncompleteResponseMixin #163
Replies: 3 comments
-
Yes, especially with the possibility to make partial fetches, as introduced in version 1.5. Could you please come up with a real-world example which I can add to my testapp. If I have time, I might find a solution for this. Sounds to be an interesting use-case. |
Beta Was this translation helpful? Give feedback.
-
Use CasesOrder FormRight now at the top of my head is an order form Class OrderItemForm
quantity = ...
amount = ...
subtotal = (should derive from quantity*amount)
Class OrderForm:
shipping = ...
grand_total = ...
Class OrderFormCollection:
order_item_formset = ...
order_item_form = ... Timesheet FormAnother possibility with added complexity is a timesheet form Class TimesheetForm
start_time = ...
end_time = ...
hours_worked = (should be derived from end_time-start_time)
hourly_rate = ...
total = (should be derived from hours_worked and hourly_rate)
Class TimesheetSummary:
grand_total = ...
Class TimesheetFormCollection:
time_sheet_form= ...
time_sheet_summary= ... |
Beta Was this translation helpful? Give feedback.
-
Out of scope but I've also explored introducing youtube tiptap extension to the richtext widget Im not very adept with ts / js (I'm basically learning as I study your library. Lol) but I was able to add custom dialog form for embeding youtube by copying some stuff from tiptap and your library. I'd be happy to add a PR for this for your review and/or improvement if you want to add this in your library. |
Beta Was this translation helpful? Give feedback.
-
I'm not completely sure if this is the proper page to raise this.
Also not sure if this could even be further worked around already in the current impl of the library.
I just figured that from my understangin of how the library works with how it introduces IncompleteResponseMixin for selectize widget functionality, that it can be opened for further dev customizability.
Say I have a usecase where I have:
and I want to include a
total
field in my form for purpose that user can view total computation and can be alerted that request item cannot be accepted as the total amount cannot exceed 1000Is there a way that when
quantity
oramount
is change, it will triggerRequestItemFormView
to change amount to be calculated on backend?I just feel likes since the form already has capability to send Form.data back to FormView using ajax calls, that we can take advantage of this for more customizable functionality.
something like
Beta Was this translation helpful? Give feedback.
All reactions