Getting started with AlpineJS

Setting AlpineJS component data values from Django forms

Want more?

This lesson for enrolled students only. Join the course to unlock it!

You can see the code changes implemented in this lecture below.

If you have purchased the course in a different platform, you still have access to the code changes per lecture here on Teclado. The lecture video and lecture notes remain locked.
Join course for $15

Modified files

templates/app/layouts/base_form.html
--- 
+++ 
@@ -13,7 +13,7 @@
     </div>

     <div class="flex gap-10 mb-10 items-center">
-      {% render_field form.status class="text-xs border-none rounded-sm uppercase" %}
+      {% render_field form.status class="text-xs border-none rounded-sm uppercase" x-model.fill="articleStatus" %}
       {% block article_stats %}

       {% endblock article_stats %}