View more context

 

anselm

ha, yeah I see that what I want to do is not exactly the main use case you guys are working on right now

flamerohr

do you mind me asking what you're trying to do?

flamerohr

I think this decoupling will be my next "hobbie" after I finish the react HTMLEditorField component hobbie 😛

anselm

I’ll build a web app, and was hoping to be able to define forms in php, and use form builder to render them in small decoupled react components

anselm

no redux, no nothing - in the old days I used to do this by just calling a form via AJAX, and using the html markup

flamerohr

Ah ok, that's even simpler than what the FormBuilder did before redux-form was implemented

anselm

@flamerohr my hacking goes on... I'm able to have form builder display some basic fields like this:

anselm
  1. js
  2. let schemaUrl = '/formschematest/schema/TestForm';
  3.  
  4. $.get(schemaUrl, function(data) {
  5.  
  6. const props = {
  7. form: 'MyForm',
  8. schema: data,
  9. baseFormComponent: Form,
  10. baseFieldComponent: TextField
  11. };
  12.  
  13. ReactDOM.render(
  14. <div>
  15. <FormBuilder {...props} />
  16. </div>,
  17. document.getElementById('approot')
  18. );
  19.  
  20. });
anselm

one question, was there a Field component prior to using redux forms?