dynamically render UI components (text, date and Paragraphfield) from database table.

Hi,

is there any way to dynamically render UI components (text, date and Paragraphfield) from database table. with out data in that fields it has to fetch only Components.

  Discussion posts and replies are publicly visible

Parents
  • You cannot fetch 'code' from a database in its raw form...e.g. you cannot store an a!textField() as a string in a database column, fetch it and use that value to render a text field. But you can store meta-data in the database and design your code to render the correct component (e.g. have in your database a column called 'fieldType' with a value of 'text' and then have an if() statement that chooses the correct component based upon the value it finds in the database.

Reply
  • You cannot fetch 'code' from a database in its raw form...e.g. you cannot store an a!textField() as a string in a database column, fetch it and use that value to render a text field. But you can store meta-data in the database and design your code to render the correct component (e.g. have in your database a column called 'fieldType' with a value of 'text' and then have an if() statement that chooses the correct component based upon the value it finds in the database.

Children