Jump to content

Is this possible - When creating new page, instead of title, ask for a pagefield?


Vineet Sawant
 Share

Recommended Posts

Hello,

Alright, so this might be a really dumb question but I must know if its posible. What I need is, whenever I'm creating a new page, the new page should besides title, also ask for a pagefield that I've already added to the template. When I give it a page and press submit, on the next window where I've to input the data for that template's custom fields, the window will show some special code from the already selected page, or may it'll just perform a predefined action on the selected page.

Is it really possible?  :undecided:

Thank you.

Link to comment
Share on other sites

What I need is, whenever I'm creating a new page, the new page should besides title, also ask for a pagefield that I've already added to the template.

You have a couple of options here. First would be to make it a "global" field, which should make it appear on the first screen when adding a page. But not all fields support that, like files, images and repeaters for instance. The other option would be to copy /wire/modules/Process/ProcessPageAdd/ into /site/modules/Process/ProcessPageAddCustom/ and rename the file name/class name consistent with the directory name (ProcessPageAddCustom). Modify the module to do exactly what you want. In the admin, edit the page Admin > Pages > Add Page. Change the "process" field to be your custom version. 

When I give it a page and press submit, on the next window where I've to input the data for that template's custom fields, the window will show some special code from the already selected page, or may it'll just perform a predefined action on the selected page.

Anything is possible, but this might be too abstract/vague of a request to provide a tangible answer. But it does potentially sound like you want a hook, or a custom Fieldtype or Inputfield to perform some automated actions.

  • Like 2
Link to comment
Share on other sites

Thanks a lot Ryan. Such a flexibility ProcessWire has!

The other option would be to copy /wire/modules/Process/ProcessPageAdd/ into /site/modules/Process/ProcessPageAddCustom/ and rename the file name/class name consistent with the directory name (ProcessPageAddCustom). Modify the module to do exactly what you want. In the admin, edit the page Admin > Pages > Add Page. Change the "process" field to be your custom version. 

I've never tried anything like that before with ProcessWire but I'd give it a try.

@kongondo I'm glad you feel so. I believe, for many people here, my questions are just like baby questions :P

I'm just learning to walk with ProcessWire, really grateful that community is holding my hands tight. :)

Link to comment
Share on other sites

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...