#Formfield showing blank page

7 messages · Page 1 of 1 (latest)

brisk relic
#

In the crowdfunding project in create-campaign page whenever i'm entering form fields it is showing a blank page.

#

and when i remove all those label name placeholder etc it changes back to normal

#

`import React, { useState } from 'react'
import { useNavigate } from 'react-router-dom';
import { ethers } from 'ethers';

import { money } from '../assets';
import { CustomButton, FormField } from '../components';
import { checkIfImage } from '../utils';

const CreateCampaign = () => {
const navigate = useNavigate();
const [isloading, setIsLoading] = useState(false);
const [from, setForm] = useState({
name: '',
title: '',
description: '',
target: '',
deadline: '',
image: ''
});

const handleSubmit = () => { }
return (
<div className='bg-[#1c1c24] flex justify-center items-center flex-col rounded-[10px] sm:p-10 p-4'>{isloading && 'Loader...'}
<div className='flex justify-center items-center p-[16px] sm:min-w-[380px] bg-[#3a3a43] rounded-[10px]'>

    <h1 className='font-epilogue font-bold sm:text-[25px] text-[18px] leading-[38px] text-white'>Start a Campaign</h1>
  </div>
  <form onSubmit={handleSubmit} className="w-full mt-[65px] flex flex-col gap-[30px]">
    <div className='flex flex-wrap gap-[40px]'>
      <FormField
        labelName="Your Name *"
        placeholder="John Doe"
        inputType="text"
        value={form.name}
        handleChange={() => { }}
      />
      <FormField
        labelName="Campaign Title *"
        placeholder="Write a title"
        inputType="text"
        value={form.title}
        handleChange={() => { }}
      />


    </div>
  </form>

</div>

)
}

export default CreateCampaign`

#

above code is for create campaign file

#

`import React from 'react'

const FormField = ({ LabelName, placeholder, inputType, isTextArea, value, handleChange }) => {
return (
<label className='flex-1 w-full flex flex-col'>
{LabelName && (
<span className='font-epilogue font-medium text-[14px] leading -[22px] text-[#808191] mb-[10px]'>{LabelName}</span>
)}

</label>

)
}

export default FormField`