Skip to content

Commit

Permalink
fix: update form data on radio button change in contact relationship …
Browse files Browse the repository at this point in the history
…form (#7226)
  • Loading branch information
Otanga-Otieno committed Nov 4, 2024
1 parent a809ecb commit 18e66f6
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion resources/js/Pages/Vault/Contact/Relationships/Create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@
value="unknown"
name="name-order"
type="radio"
class="h-4 w-4 border-gray-300 text-sky-500 dark:border-gray-700" />
class="h-4 w-4 border-gray-300 text-sky-500 dark:border-gray-700"
@click="hideContactNameField" />
<label
for="unknown"
class="ms-3 block cursor-pointer text-sm font-medium text-gray-700 dark:text-gray-300">
Expand Down Expand Up @@ -430,6 +431,19 @@ export default {
});
},
hideContactNameField() {
this.form.choice = 'unknown';
this.form.first_name = '';
this.form.last_name = '';
this.form.middle_name = '';
this.form.nickname = '';
this.form.maiden_name = '';
this.form.gender_id = '';
this.form.pronoun_id = '';
this.showContactName = false;
this.showMoreContactOptions = false;
},
displayContactSelector() {
this.form.choice = 'choice';
this.showContactName = false;
Expand Down

0 comments on commit 18e66f6

Please sign in to comment.