Skip to content

Commit

Permalink
done
Browse files Browse the repository at this point in the history
  • Loading branch information
mukilan2815 committed Jun 25, 2024
1 parent bb15f6b commit dbecc95
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions src/Pages/Client/NewMember/Membershipform.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,14 @@ const Membershipform = () => {
"Associations",
];

const handleInputChange = (e) => {
const { name, value } = e.target;
setFormData({ ...formData, [name]: value });
const handleInputChange = (event) => {
const { name, type, checked, value } = event.target;
const inputValue = type === "checkbox" ? checked : value;

setFormData({
...formData,
[name]: inputValue,
});
};

const handleProfessionChange = (index, value) => {
Expand Down Expand Up @@ -550,33 +555,34 @@ const Membershipform = () => {
<div className="flex items-center">
<h6 className="w-64 text-right pr-4">Domestic:</h6>
<input
type="text"
type="checkbox"
name="domestic"
value={formData.domestic}
checked={formData.domestic}
onChange={handleInputChange}
className="px-2 border-b border-black w-64"
/>
</div>
<div className="flex items-center">
<h6 className="w-64 text-right pr-4">Global:</h6>
<input
type="text"
type="checkbox"
name="global"
value={formData.global}
checked={formData.global}
onChange={handleInputChange}
className="px-2 border-b border-black w-64"
/>
</div>
<div className="flex items-center">
<h6 className="w-64 text-right pr-4">Both:</h6>
<input
type="text"
type="checkbox"
name="both"
value={formData.both}
checked={formData.both}
onChange={handleInputChange}
className="px-2 border-b border-black w-64"
/>
</div>

<div className="flex items-center">
<h6 className="w-64 text-right pr-4">% of Exports:</h6>
<input
Expand Down

0 comments on commit dbecc95

Please sign in to comment.