Jump to content

How to render a simpelt inputfield markup??


Biorn
 Share

Recommended Posts

Hi Martijn,

I think the OP was possibly asking about front-end forms, where the markup is really important, but tying it into the PW admin system is not. Seems that the form builder api can still provide some value there, even though that's not its primary use-case.

But yes, I understand how if you are building an admin page that it would be important to hook into the larger PW system so that other people can program against your own module in the future.

  • Like 1
Link to comment
Share on other sites

I think you now that the form builder fields are accessible. You could loop them and create your own markup out of that loop.

The only reason I didn't build a module for that is that it'll take a lot of effort to do it right. One way to do this is with little templates for each field.

Link to comment
Share on other sites

  • 1 year later...

Martijn,

Can you explain to me how you can create templates for different fields? I would be interested in knowing this, but as a PW newbie I am unsure where to begin. Thanks!

Hi Martijn,

I want to know this too how you can setup a different markup for an specific field not specific type of field for example I have 2 inputText I want one to be.

<div>
   <label>...</label>
   <input>...</input>
</div>
and the other field
<div>
   <label>...</label>
   <input>...</input>
   <span>....</span>
</div>
  • Like 1
Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...