# \#forms

**URL:** https://forum.elixirforum.com/tag/forms/5.md

[Latest](https://forum.elixirforum.com/latest.md) · [Categories](https://forum.elixirforum.com/categories.md) · [Tags](https://forum.elixirforum.com/tags.md)

---

## [How do you handle mutually dependent form fields in LiveView forms?](https://forum.elixirforum.com/t/how-do-you-handle-mutually-dependent-form-fields-in-liveview-forms/75195)

<div class="topic-metadata">

**Author:** [@PaleWatcher](https://forum.elixirforum.com/u/PaleWatcher)\
**Replies:** 4\
**Last updated:** [May 2, 2026, 12:24pm UTC](https://forum.elixirforum.com/t/how-do-you-handle-mutually-dependent-form-fields-in-liveview-forms/75195 "2026-05-02T12:24:35Z")

</div>

Suppose you have two fields in a Phoenix LiveView form where both are user-editable, and each one can be used to calculate the other. Example: A → derive B B → derive A Both inputs are valid entry points for the user. …

---

## [Where to find documentation for writing Phoenix heex forms?](https://forum.elixirforum.com/t/where-to-find-documentation-for-writing-phoenix-heex-forms/73893)

<div class="topic-metadata">

**Author:** [@shkokielixir](https://forum.elixirforum.com/u/shkokielixir)\
**Replies:** 5\
**Last updated:** [January 7, 2026, 7:01am UTC](https://forum.elixirforum.com/t/where-to-find-documentation-for-writing-phoenix-heex-forms/73893 "2026-01-07T07:01:25Z")

</div>

I’m new to pheonix and just going throught the getting started, I can’t find where to learn more about forms and the whole /new → post /create → get /show flow… sorry if this is a dumb question but I’m kinda confused

---

## [How do I prevent my Delete button from triggering a form submission?](https://forum.elixirforum.com/t/how-do-i-prevent-my-delete-button-from-triggering-a-form-submission/72654)

<div class="topic-metadata">

**Author:** [@bvobart](https://forum.elixirforum.com/u/bvobart)\
**Replies:** 4\
**Last updated:** [September 25, 2025, 10:22pm UTC](https://forum.elixirforum.com/t/how-do-i-prevent-my-delete-button-from-triggering-a-form-submission/72654 "2025-09-25T22:22:25Z")

</div>

Hi Elixir forum! I have a function component to view, edit and delete an object from my database. This component obviously contains a form to perform and submit the edits that the user makes, but it also contains a Dele…

---

## [How to DaisyUI modal + form?](https://forum.elixirforum.com/t/how-to-daisyui-modal-form/71859)

<div class="topic-metadata">

**Author:** [@DestroyedSoul](https://forum.elixirforum.com/u/DestroyedSoul)\
**Replies:** 3\
**Last updated:** [July 29, 2025, 2:25pm UTC](https://forum.elixirforum.com/t/how-to-daisyui-modal-form/71859 "2025-07-29T14:25:32Z")

</div>

Hello, I am using Phoenix 1.8.x where the modal core component has been removed. I try to use DaisyUI modal component like this: \<!-- Button that opens modal --\> \<.button onclick="add\_item\_modal.showModal()" variant…

---

## [Create multi-image upload with liveview and add descriptions to each image](https://forum.elixirforum.com/t/create-multi-image-upload-with-liveview-and-add-descriptions-to-each-image/62150)

<div class="topic-metadata">

**Author:** [@Awlexus](https://forum.elixirforum.com/u/Awlexus)\
**Replies:** 5\
**Last updated:** [June 25, 2025, 9:40am UTC](https://forum.elixirforum.com/t/create-multi-image-upload-with-liveview-and-add-descriptions-to-each-image/62150 "2025-06-25T09:40:11Z")

</div>

I’m struggling to create a form where the user should be able to upload multiple images and add descriptions for each of them. The idea is to add them as embeds to a resource (in this case a post resource). defmodule My…

---

## [Desperate to get this parent lookup working in simple form .input type=select](https://forum.elixirforum.com/t/desperate-to-get-this-parent-lookup-working-in-simple-form-input-type-select/71173)

<div class="topic-metadata">

**Author:** [@wdtnh](https://forum.elixirforum.com/u/wdtnh)\
**Replies:** 4\
**Last updated:** [June 17, 2025, 9:44am UTC](https://forum.elixirforum.com/t/desperate-to-get-this-parent-lookup-working-in-simple-form-input-type-select/71173 "2025-06-17T09:44:42Z")

</div>

I have a phoenix app with a lot of related tables. In particular, I have a regions (think territory) as a parent table that has a related child table consisting of 3-digit zip codes that are in a table region\_zips. I n…

---

## [Nesting .inputs\_for/1 in a dyanmic form, what is the right approach?](https://forum.elixirforum.com/t/nesting-inputs-for-1-in-a-dyanmic-form-what-is-the-right-approach/70652)

<div class="topic-metadata">

**Author:** [@windexoriginal](https://forum.elixirforum.com/u/windexoriginal)\
**Replies:** 2\
**Last updated:** [April 28, 2025, 8:28am UTC](https://forum.elixirforum.com/t/nesting-inputs-for-1-in-a-dyanmic-form-what-is-the-right-approach/70652 "2025-04-28T08:28:23Z")

</div>

I’m trying to get nested form\_for attributes in LV (phoenix 1.8 rc 0, liveview 1.0) by following the patterns in \`inputs\_for/1 but I’m not having any luck. The associations: #Job can have many accomplishments, accompli…

---

## [Proper way to update Phoenix.HTML.Form after a \`put\_change\` on the changset](https://forum.elixirforum.com/t/proper-way-to-update-phoenix-html-form-after-a-put-change-on-the-changset/70587)

<div class="topic-metadata">

**Author:** [@toodle](https://forum.elixirforum.com/u/toodle)\
**Replies:** 3\
**Last updated:** [April 23, 2025, 3:42pm UTC](https://forum.elixirforum.com/t/proper-way-to-update-phoenix-html-form-after-a-put-change-on-the-changset/70587 "2025-04-23T15:42:08Z")

</div>

I am building a LiveView form where, after initial user input, validation of the changeset includes “normalizing” one of the fields (let’s call it :address). The form struct is being generated by Phoenix.Component.to\_for…

---

## [International Address Formats + Forms in Elixir](https://forum.elixirforum.com/t/international-address-formats-forms-in-elixir/70396)

<div class="topic-metadata">

**Author:** [@wmnnd](https://forum.elixirforum.com/u/wmnnd)\
**Replies:** 6\
**Last updated:** [April 10, 2025, 2:57pm UTC](https://forum.elixirforum.com/t/international-address-formats-forms-in-elixir/70396 "2025-04-10T14:57:57Z")

</div>

Hey folks, I’m currently working on adding an address form to Keila. Unfortunately, address forms can be wildly different from country to country. Do they require a postal code? Does the postal code go before or after t…

---

## [Phoenix.Router.NoRouteError no route found for POST when submitting live view form](https://forum.elixirforum.com/t/phoenix-router-norouteerror-no-route-found-for-post-when-submitting-live-view-form/69909)

<div class="topic-metadata">

**Author:** [@evao](https://forum.elixirforum.com/u/evao)\
**Replies:** 10\
**Last updated:** [March 18, 2025, 6:37pm UTC](https://forum.elixirforum.com/t/phoenix-router-norouteerror-no-route-found-for-post-when-submitting-live-view-form/69909 "2025-03-18T18:37:17Z")

</div>

I am trying to migrate an app that uses controllers to live view. I have a form component that I believe handles the submit event and navigates to a new page. However, when I try to submit the form, I get this error: Ph…

---

## [Not able to send multiple events with JS.push in phx-submit](https://forum.elixirforum.com/t/not-able-to-send-multiple-events-with-js-push-in-phx-submit/67174)

<div class="topic-metadata">

**Author:** [@Ti-Max](https://forum.elixirforum.com/u/Ti-Max)\
**Replies:** 3\
**Last updated:** [March 5, 2025, 1:12pm UTC](https://forum.elixirforum.com/t/not-able-to-send-multiple-events-with-js-push-in-phx-submit/67174 "2025-03-05T13:12:15Z")

</div>

I want to send multiple events to liveview on the form submittion. I am chaining two JS.push commands, but the server recieves only first\_event. \<.form :let={f} for={%{}} phx-submit={JS.push("first\_event") |\> JS.pus…

---

## [Why does \`normalize\_input\` not exist for things like numbers and booleans](https://forum.elixirforum.com/t/why-does-normalize-input-not-exist-for-things-like-numbers-and-booleans/69621)

<div class="topic-metadata">

**Author:** [@ashkan117](https://forum.elixirforum.com/u/ashkan117)\
**Replies:** 0\
**Last updated:** [February 25, 2025, 10:06pm UTC](https://forum.elixirforum.com/t/why-does-normalize-input-not-exist-for-things-like-numbers-and-booleans/69621 "2025-02-25T22:06:36Z")

</div>

I wasn’t aware of normalize\_input function in HTML.Form and thought it would be useful to start using more often in tandem with liveview forms since if I have an \<.input type="number" .../\> it would be nice to get that b…

---

## [Datetime input and time zone](https://forum.elixirforum.com/t/datetime-input-and-time-zone/69379)

<div class="topic-metadata">

**Author:** [@Sorc96](https://forum.elixirforum.com/u/Sorc96)\
**Replies:** 4\
**Last updated:** [February 13, 2025, 9:21pm UTC](https://forum.elixirforum.com/t/datetime-input-and-time-zone/69379 "2025-02-13T21:21:23Z")

</div>

I have been searching for a way to deal with datetime values coming from forms. The datetime-local input does not care about time zones, so the information is lost and casting to Ecto’s :utc\_datetime assumes the value al…

---

## [Struggling with forms - suspect calling handle\_event("validate", ...) from within handle\_event("append", ...) is not correct](https://forum.elixirforum.com/t/struggling-with-forms-suspect-calling-handle-event-validate-from-within-handle-event-append-is-not-correct/68962)

<div class="topic-metadata">

**Author:** [@blazejcm](https://forum.elixirforum.com/u/blazejcm)\
**Replies:** 11\
**Last updated:** [January 29, 2025, 7:27pm UTC](https://forum.elixirforum.com/t/struggling-with-forms-suspect-calling-handle-event-validate-from-within-handle-event-append-is-not-correct/68962 "2025-01-29T19:27:38Z")

</div>

Hello! I’ve been banging my head against a wall… Maybe someone can help. My question kind of goes deep but hopefully I can boil it down… I have a really simple form where the user enters a float number. In addition to…

---

## [Form inputs not mapping to the underlying entity](https://forum.elixirforum.com/t/form-inputs-not-mapping-to-the-underlying-entity/69009)

<div class="topic-metadata">

**Author:** [@blazejcm](https://forum.elixirforum.com/u/blazejcm)\
**Replies:** 10\
**Last updated:** [January 29, 2025, 7:45am UTC](https://forum.elixirforum.com/t/form-inputs-not-mapping-to-the-underlying-entity/69009 "2025-01-29T07:45:40Z")

</div>

Hello! There is a fundamental question related to LiveView forms that I’ve been struggling with. In all the simple form tutorials, the form fields map one-to-one to the fields of the underlying data structure. But in my…

---

## [New tools, and a new guide on nested forms with \`AshPhoenix.Form\`!](https://forum.elixirforum.com/t/new-tools-and-a-new-guide-on-nested-forms-with-ashphoenix-form/68654)

<div class="topic-metadata">

**Author:** [@zachdaniel](https://forum.elixirforum.com/u/zachdaniel)\
**Replies:** 3\
**Last updated:** [January 22, 2025, 12:20pm UTC](https://forum.elixirforum.com/t/new-tools-and-a-new-guide-on-nested-forms-with-ashphoenix-form/68654 "2025-01-22T12:20:17Z")

</div>

Working with nested forms in Ash was already great, but it’s even better now with a the new features that will be in the next release of AshPhoenix! Use hidden checkboxes to automatically add, remove and reorder nested f…

---

## [Error helper \`error\_tag/2\` deprecated?](https://forum.elixirforum.com/t/error-helper-error-tag-2-deprecated/57882)

<div class="topic-metadata">

**Author:** [@coen.bakker](https://forum.elixirforum.com/u/coen.bakker)\
**Replies:** 9\
**Last updated:** [January 12, 2025, 11:46pm UTC](https://forum.elixirforum.com/t/error-helper-error-tag-2-deprecated/57882 "2025-01-12T23:46:00Z")

</div>

Quick question. I have been reading up on using forms in LiveView. I come across the error\_tag/2 function often (for example in this 2022 article by Sophie DeBenedetto) but in the latest official documentation I cannot …

---

## [Showing form fields conditionally base on radio input value](https://forum.elixirforum.com/t/showing-form-fields-conditionally-base-on-radio-input-value/68663)

<div class="topic-metadata">

**Author:** [@Arsenalist](https://forum.elixirforum.com/u/Arsenalist)\
**Replies:** 6\
**Last updated:** [January 12, 2025, 12:42am UTC](https://forum.elixirforum.com/t/showing-form-fields-conditionally-base-on-radio-input-value/68663 "2025-01-12T00:42:03Z")

</div>

I want to show input fields based on the value of a the radio button. Here are the two approaches I tried. This is inside a LiveComponent and I’m on LiveView 1.0.2. What is the best way to implement this simple feature…

---

## [Search Select Functionality Implementation as a LiveComponent](https://forum.elixirforum.com/t/search-select-functionality-implementation-as-a-livecomponent/68598)

<div class="topic-metadata">

**Author:** [@nikolis](https://forum.elixirforum.com/u/nikolis)\
**Replies:** 3\
**Last updated:** [January 9, 2025, 7:45am UTC](https://forum.elixirforum.com/t/search-select-functionality-implementation-as-a-livecomponent/68598 "2025-01-09T07:45:27Z")

</div>

Hello Fellas So I was building as the title implies a search Select functionality for a project of mine and since I was utilizing the functionality in many places I tried to create a re-usable component. Specs Should…

---

## [Managing used inputs in client hooks (phx-hook) in LiveView 1.0](https://forum.elixirforum.com/t/managing-used-inputs-in-client-hooks-phx-hook-in-liveview-1-0/68562)

<div class="topic-metadata">

**Author:** [@linusdm](https://forum.elixirforum.com/u/linusdm)\
**Replies:** 2\
**Last updated:** [January 8, 2025, 8:05am UTC](https://forum.elixirforum.com/t/managing-used-inputs-in-client-hooks-phx-hook-in-liveview-1-0/68562 "2025-01-08T08:05:04Z")

</div>

While moving to LiveView 1.0 I encountered the following problem. We integrate flatpickr for date inputs using Clients hooks (e.g. phx-hook). This library dynamically generates an alternative form input element that all…

---

## [💦 Drops - Simplifying Data Validation in Elixir](https://forum.elixirforum.com/t/drops-simplifying-data-validation-in-elixir/59232)

<div class="topic-metadata">

**Author:** [@solnic](https://forum.elixirforum.com/u/solnic)\
**Replies:** 18\
**Last updated:** [November 22, 2024, 5:30pm UTC](https://forum.elixirforum.com/t/drops-simplifying-data-validation-in-elixir/59232 "2024-11-22T17:30:14Z")

</div>

Hello! Today I released the first version of Elixir Drops :slight\_smile: The announcement can be found on my blog but I’m also just pasting it here: A few years ago my Ruby friends asked me if it would be possible to p…

---

## [Trouble resetting a LiveView form programmatically](https://forum.elixirforum.com/t/trouble-resetting-a-liveview-form-programmatically/67532)

<div class="topic-metadata">

**Author:** [@axelson](https://forum.elixirforum.com/u/axelson)\
**Replies:** 9\
**Last updated:** [November 18, 2024, 5:09pm UTC](https://forum.elixirforum.com/t/trouble-resetting-a-liveview-form-programmatically/67532 "2024-11-18T17:09:42Z")

</div>

I’m trying to reset my LiveView form programmatically (on submit) but I’m having lots of trouble getting the form to reset programmatically in a way where my LiveView can trigger the reset. My form is driven by an Ecto …

---

## [Multiselect checkbox input for existing records](https://forum.elixirforum.com/t/multiselect-checkbox-input-for-existing-records/67233)

<div class="topic-metadata">

**Author:** [@nyakio](https://forum.elixirforum.com/u/nyakio)\
**Replies:** 3\
**Last updated:** [November 13, 2024, 9:31am UTC](https://forum.elixirforum.com/t/multiselect-checkbox-input-for-existing-records/67233 "2024-11-13T09:31:03Z")

</div>

I have an invitation form that includes a list of existing groups a user can be invited to. The form does not allow creating new groups but lets users select from the existing groups to associate with the invitation. Be…

---

## [Working with to\_form and inputs\_for without Ecto & chageset](https://forum.elixirforum.com/t/working-with-to-form-and-inputs-for-without-ecto-chageset/66930)

<div class="topic-metadata">

**Author:** [@ar7casper](https://forum.elixirforum.com/u/ar7casper)\
**Replies:** 5\
**Last updated:** [October 23, 2024, 11:57am UTC](https://forum.elixirforum.com/t/working-with-to-form-and-inputs-for-without-ecto-chageset/66930 "2024-10-23T11:57:00Z")

</div>

Hi, I’m building an app that uses SurrealDB, I connect to it via RPC and I want to be able to present a form to the user that lets it add and edit some data. So far, pretty much straight forward, no issues. That’s wha…

---

## [Update fields of a nested AshPhoenix.Form on change of a different field](https://forum.elixirforum.com/t/update-fields-of-a-nested-ashphoenix-form-on-change-of-a-different-field/60954)

<div class="topic-metadata">

**Author:** [@lardcanoe](https://forum.elixirforum.com/u/lardcanoe)\
**Replies:** 5\
**Last updated:** [October 21, 2024, 12:21pm UTC](https://forum.elixirforum.com/t/update-fields-of-a-nested-ashphoenix-form-on-change-of-a-different-field/60954 "2024-10-21T12:21:51Z")

</div>

I have a User resource with has\_many roles. The role has a time\_period field, so when I show the array of roles using input\_for, each role has a dropdown/select for the time\_period. When the user changes a role’s time\_…

---

## [Value from form-associated custom element not included in form params on submit](https://forum.elixirforum.com/t/value-from-form-associated-custom-element-not-included-in-form-params-on-submit/66550)

<div class="topic-metadata">

**Author:** [@budgie](https://forum.elixirforum.com/u/budgie)\
**Replies:** 2\
**Last updated:** [October 7, 2024, 3:25am UTC](https://forum.elixirforum.com/t/value-from-form-associated-custom-element-not-included-in-form-params-on-submit/66550 "2024-10-07T03:25:18Z")

</div>

I’m using a custom element for duration selection. It has a few buttons that modify the value. When I inspect the params from the phx-submit event, there is no value included from the custom element. I want it to be trea…

---

## [How do you POST a byte array inside a form field to a Phoenix endpoint via \`curl\` or such?](https://forum.elixirforum.com/t/how-do-you-post-a-byte-array-inside-a-form-field-to-a-phoenix-endpoint-via-curl-or-such/66443)

<div class="topic-metadata">

**Author:** [@dimitarvp](https://forum.elixirforum.com/u/dimitarvp)\
**Replies:** 4\
**Last updated:** [October 1, 2024, 6:45pm UTC](https://forum.elixirforum.com/t/how-do-you-post-a-byte-array-inside-a-form-field-to-a-phoenix-endpoint-via-curl-or-such/66443 "2024-10-01T18:45:11Z")

</div>

So I have this callback endpoint where I accept a delayed status update for jobs that I tasked a remote server with. I have made a table that only has ID, data field (jsonb type) and inserted\_at and just store the respon…

---

## [Toggling the form state makes fields disappear](https://forum.elixirforum.com/t/toggling-the-form-state-makes-fields-disappear/65954)

<div class="topic-metadata">

**Author:** [@rakesh-gupta29](https://forum.elixirforum.com/u/rakesh-gupta29)\
**Replies:** 0\
**Last updated:** [September 9, 2024, 8:53am UTC](https://forum.elixirforum.com/t/toggling-the-form-state-makes-fields-disappear/65954 "2024-09-09T08:53:41Z")

</div>

Form works fine when user is in edit mode. When the mode is toggled, and the user starts typing, form fields disappear. defmodule PortalWeb.ClientLive.ProfileLive do @moduledoc """ profile page for clients. they …

---

## [How might I register a change event for a custom complex form input?](https://forum.elixirforum.com/t/how-might-i-register-a-change-event-for-a-custom-complex-form-input/65545)

<div class="topic-metadata">

**Author:** [@budgie](https://forum.elixirforum.com/u/budgie)\
**Replies:** 9\
**Last updated:** [August 29, 2024, 5:35pm UTC](https://forum.elixirforum.com/t/how-might-i-register-a-change-event-for-a-custom-complex-form-input/65545 "2024-08-29T17:35:14Z")

</div>

I have a custom LiveComponent form input that is built with 3 text inputs: one hidden and 2 visible. The hidden text input holds a duration in minutes for submission of the form. The other inputs are there for the user t…

---

## [Simple form error when try to use the %Plug.Con in the 'for'](https://forum.elixirforum.com/t/simple-form-error-when-try-to-use-the-plug-con-in-the-for/65628)

<div class="topic-metadata">

**Author:** [@pmareke](https://forum.elixirforum.com/u/pmareke)\
**Replies:** 6\
**Last updated:** [August 23, 2024, 5:43am UTC](https://forum.elixirforum.com/t/simple-form-error-when-try-to-use-the-plug-con-in-the-for/65628 "2024-08-23T05:43:44Z")

</div>

Hi all, I’m really new in the Elixir/Phoenix world, so first of all sorry if I ask something in the wrong place. The thing is that if in an new Phoenix project (I’m following the example from the Phoenix Programming 1.4…

[Next page](https://forum.elixirforum.com/tag/forms/5.md?match_all_tags=true&page=1&tags%5B%5D=forms)
