Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Conditional input change#426

Unanswered
mencargo asked this question inQuestions
Discussion options

I'm doing a user registry form with address fields that include country and state.
Similar to the vueformexample, I want to show states as a searchable list when a specific country is selected. (conditions)
However, I don't want the state field to be removed, but to turn into a free text input instead.
Is there a simple way to achieve this?

        country: {          type: 'select',          search: true,          native: false,          inputType: 'search',          autocomplete: 'off',          columns: {            container: 6,          },          label: 'País',          items: '/src/assets/json/countries.json',          default: 'MX'        },        state: {          type: 'select',          search: true,          native: false,          inputType: 'search',          autocomplete: 'off',          columns: {            container: 6,          },          label: 'Estado',          items: '/src/assets/json/mx-states.json',          conditions: [['country', 'MX']]        },
You must be logged in to vote

Replies: 1 comment

Comment options

Current workaround using 2 fields with conditions:

        country: {          type: 'select',          search: true,          native: false,          inputType: 'search',          autocomplete: 'off',          columns: {            container: 6,          },          label: 'País',          items: '/src/assets/json/countries.json',          default: 'MX'        },        mx_state: {          type: 'select',          search: true,          native: false,          inputType: 'search',          autocomplete: 'off',          columns: {            container: 6,          },          label: 'Estado',          items: '/src/assets/json/mx-states.json',          conditions: [['country', '==', 'MX']]        },        free_state: {          type: 'text',          columns: {            container: 6,          },          label: 'Estado',          conditions: [['country', '!=', 'MX']]        },
You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Questions
Labels
None yet
1 participant
@mencargo

[8]ページ先頭

©2009-2025 Movatter.jp