I have a form in which there are three fields, basically these fields contain drop-down lists - selections. These select lists are based on a data model that has fields associated with ForeynKey .
After completing this form.
I update information, code and do calculations in code.
Further after the calculations.
I am updating two elements on the template - a table and a graph.
I have these two elements in separate parts of the template.
Like two different pieces of HTML .
With (HTMX) I can only update one element on the table - this element is a chunk of the HTML template - which is updated by rendering that chunk of that template. How can I update another piece of the template?
How can two HTML template elements be updated using (HTMX) ?
Side note: When posting code, enclose the code between lines of three backtick - ` characters. This means you’ll have a line of ```, then your code, then another line of ```. This forces the forum software to keep your code properly formatted, avoiding the need for you to add the > characters at the beginning of each line. (Note: Those lines of ``` must be lines by themselves, there must not be anything else before or after those backticks on that line.)
Thank you very much for your help.
You are saving me.
I have two elements.
I placed them, not as an embedding, (include) in the template from an additional other piece (part) of the html element.
And as part of the main part of the entire html template.
I end up returning elements from a piece of the html part.
Which contains two elements that I want to update.
If you have the opportunity, you can roughly suggest what you need to write in the settings of the div element.
I edited the main part of the question at the top - added new elements.
I’m not sure I understand what you’re asking for here. Is something not working? If not, can you be more specific about exactly what’s happening that you’re not expecting to have happen? (Or what’s not happening that you’re expecting to have happen)
Where is this coming from? Do you have some middleware that is setting this on your request object?
Regarding this:
Aside from the doubled quotes at the end, you don’t specify the target for any OOB-defined elements. The hx-target applies to the first div being returned.