elegantthemes / create-divi-extension

MIT License
184 stars 58 forks source link

Need ways to add custom form in Divi module #691

Open kumarmuthaiah opened 1 month ago

kumarmuthaiah commented 1 month ago

Problem Description

I need to create a form in the module. If used "table" html tag to display fields and form controls, then cannot display fine in all devices. How to handle this in module code? I need sample php code so that i can put in the module php. There is no documentations and hence asking. The form looks like below

image

The contact form module does not solve my need. The modules that support custom form are too costly to purchase now. i'm building a custom word press site that has custom predefined forms (each form uses one divi module), which sends data to the wordpress server using wordpress rest api (ajax call), that stores data in respective models as tables in mysql.

Currently I'm using "code" module to add the above form and use wordpress rest api to send the data. If the developer has custom modules then it would be better, since it renders the form in server itself, including the dynamic form fields whose data taken from tables.

Steps To Reproduce

1.

Screenshot and/or gif

kumarmuthaiah commented 1 month ago

I used like as follows and Divi automatically aligns based on device. anyway thanks! Close it

<span style="width:150px">Admission for the Academic Year?</span>&nbsp;&nbsp;<select id="academicYear"  style="width:150px;border: 1px solid black">
  <option>2023 - 2024</option>
  <option>2024 - 2025</option>
            </select><br><br><span style="width:100px">Admission Board?</span>&nbsp;&nbsp;<select id="academicBoard"  style="width:150px;border: 1px solid black">
  <option value="">None</option>
  <option value="">CBSE</option>
  <option value="">NIOS</option>
  <option value="">IGCSE</option>
</select>
image