How to Create Custom Forms


#1

When I go to https://secure.phabricator.com/book/phabricator/article/forms/ I read the section titled “Creating New Forms” but the information is out-of-context information. The first instructions is "navigate to an existing form via “Create” or “Edit” and choose Actions → View Form Configurations. " But I have clicked every thing I can find inside Phabricator at least two or seventeen times and I don’t know where this “Create” or “Edit” button is?

Can you point it to me?


#2

It refers to “create or edit an object” - basically just have any customizable form open.


#3

Um. If I ask really really nicely could you tell me how to do that? I don’t see any customizable forms and the directions do not describe how to navigate to one. That is why I am asking for help here.

So: please with candy and sugar? Could you tell me how to navigate to this “any customizable form” or to a place where I can choose “Actions → View Form Configurations”?

Thank you. :grinning:


#4

Sounds like you already found it. go to Maniphest and create a new task - there’s an “Configure Form” button on the right side.


#5

No I didn’t. I’m still hoping for an answer to my original question.


#6

Try https://yourDomainName/transactions/editengine/


#7

@aklapper Thank you but this is where I already was. It doesn’t give me the option to create custom forms. I can create a very simple form with only a preamble. But nothing similar to what already exists for tasks.

Am I wrong? Do you have instructions for how to do this from the screen you sent? The article at https://secure.phabricator.com/book/phabricator/article/forms/ does not explain. (It is very badly written like the other Phab docs).


#8

Going to /transactions/editengine/ and choosing one of the available listed options, the next page does offer a “Create form” link at the top.
I am not sure what exactly you are asking for and what exactly you are missing.


#9

I have been there. Have you tried what you are suggesting? Do you see what is available to you when you do that? Do you see how that is different from the fields in a Task? The difference between those two things is what I am missing.

What I am asking for is a way to clone the Task form, or to create an actual custom form with the same features that are available with any other form. And by “a way” I mean a way that is somewhat intuitive. I always understand that open source projects need time investment and contribution back to the project, but I don’t have this huge amount of time I am spending on Phabricator to fix the tools I use to do the actual work I do.


#10

Yes, I have tried what I am suggesting. If I take Form 1 for Tasks I see all fields listed that I can imagine. So I unfortunately don’t know what your “the difference” is.
If you want to clone a Task form, there is “Configure Form > Edit Form Configuration” which offers “Duplicate Form”.


#11

f I take Form 1 for Tasks I see all fields listed that I can imagine.

Then either you have a small imagination or I am not finding the same thing you are. Please can you give me directions to this “Form 1 for Tasks” from the Phabricator homepage?


#12

When you say custom forms I assume you mean for Maniphest? To do this firstly I created a new subtype

http://myhost.com/config/edit/maniphest.subtypes/

[
  {
    "key": "default",
    "name": "Task"
  },
  {
    "key": "bugid",
    "name": "BugTracker Issue",
    "tag": "BUG"
  }
]

Your new type will appear when you create a task via (when you click on it)

image

If your adding a custom form its likely you’ll have new fields you need some custom field definitions

http://myhost.com/config/edit/maniphest.custom-field-definitions/

Here I simply add a single field to present and OS

  "mycompany:bugtracker-platform-os": {
    "name": "OS",
    "type": "text"
  },

But you can have lots of different types, and some can even be “TypeAheads”, “DropDowns” etc… (the documentation for the custom-field-definitions tells you how to change the type of the field int,text,users etc…

Now you can customize the edit/view form for these subtypes, to do so go create a dummp task of this subtype, and now go into Customize Form

you’ll see this in the corner

image

Clicking on the edit form configuration lets you create a Form for this subtype

The curtain (I think that is what they call it)

image

has a number of capabilities

Firstly I “Mark” both forms as the “Create and Edit” form, (but I can see sometimes you want to add less info when creating a task, so if you want separate behavior you may need 2 forms

The rest of the commands are fair self explanatory (but Lock/Hide is where you can remove or make fields read-only) and Change Field Order is where you can move the fields of the form up/down, the layout is pretty basic but it does the job

After this the Form should be associated with the subtype, (a subtype is just like any other Maniphest task but lets you be specific)

At the end of the day all the data behind all forms I think is a union of all types, so this is really just about hiding some information.

I hope this helps…


#13

Can you direct me to this please?


#14

Go to maniphest

image

Create a new blank task

click on the dropdown

This will take you into the “edit form” screen described above


#15

@mydeveloperday This is very confusing. Are you answering the question I asked aklapper?

I know how to get to “Edit Form Configuration” the way you said. But @aklapper said there is a way to click on “Duplicate Form” after the “Edit Form Configuration” he talked about. So I asked for directions to that.

If I follow your directions I am on a page that has an alert bar that says:

“This is a preview of the current form configuration” and I have these menu options:

Edit Form Configuration
Use Form
Change Default Values
Change Field Order
Lock / Hide Fields
Change Form Subtype
Disable Form
Unmark as “Create” Form
Unmark as “Edit” Form

Now obviously it is crazy that “Edit Form Configuration” is an option under the “Edit Form Configuration” page that I just clicked on. But because there is no “Duplicate” on this page I think maybe @aklapper means the second one. So I click on “Edit Form Configuration” and I go to a page that says:

Edit Form 1: Create Task

Then there is a form with only the same three fields that are not sufficient: Name, Preamble, and Visible to. There is also the “Configure Form” dropdown that has the same options that I got two pages ago! So I am in a loop.

So please tell me what you are trying to direct me to here.


#16

You say this and then you have this code:

[
  {
    "key": "default",
    "name": "Task"
  },
  {
    "key": "bugid",
    "name": "BugTracker Issue",
    "tag": "BUG"
  }
]

This looks like two subtypes. Why would you add a subtype for “Task” if “Task” already exists?


#17

Becuase a form configuration is tied I believe to a subtype (unless you want to be able to edit the default task form)

For example in my instance, I have 1 type of task which is just a pain task (created in phabricator)

and a different type of task which is created by a “bot” (via conduit)


#18

I don’t understand what this means. I have spent three hours today trying to get a simple form to create bug reports instead of actually fixing the bugs on our product. I don’t think you realize that I do not have any time to learn the inside workings of Phabricator. My mind is already full of the inside workings of the software that we build. :slight_smile: If you can create a full guide for how to do this we can discuss compensation. Also if you can solve the other problem I have (having commits show in a project feed).


#19

I’m trying…:wink: (please remember I don’t work for Phacilty)

so if you go to the list of forms

http://myhost.com/transactions/editengine/maniphest.task/

These are the various forms for your maniphest tasks, you can create a new form here, or edit an existing one

now if you click on the “Create Task” link

you’ll see something like this…

I agree the “Edit Form Configuration” here is perhaps confusing its really “Edit Details”

it brings you here, but this is just information about the Form (so you could give your users some sort of context)

its not where you actually configure the form…that is all done in the previous screen.

This is where you are editing the form… (field order/visibility etc…)

I might be wrong but I don’t think there is any “Duplicate Form” functionality that I’ve seen…

if you need to customize the default form do it here, if you need to add a new specific customization use the “Create Form” button in the top right, and come back here and perform the same/similar actions


#20

Are you saying I should do something? What should I do here? Please, I do not care to learn how this thing works anymore. In the beginning I was willing but I have spent 15+ HOURS on a tiny little support piece of the infrastructure. I just want instructions on how to allow users to submit bug reports.

I will compensate the individual who can do this, doesn’t matter if this person works for Phacility.

WHERE? Where is that? If that is where I should create the form, and you know I want to create a form, why are you not telling me where this is? :slight_smile:

But what do you mean by “editing the form”? I don’t want to edit an existing form. I like the forms that exist. I want to create a form for bug reports.