Form Page Designer Issues

There seems to be issues designing a form page. There is a button near the top which lets you design where the fields go on the page. This has always been a bit quirky, but now it is difficult to work that designer at all. Changing widths for form fields seems to give unexpected results. Sometimes I can move a field and/or change its width, but sometimes (most of the time) it does not work. If I try to widen a field, it only widens a small amount. If I try to widen it more, it then goes back to the prior width.

Any ideas on this? Is it a known issue? Thanks…

This is a known issue, and we’ll look into it. When trying to widen a field, please ensure the cursor is inside the field. If you grab it from the outer edge, it won’t work.

Thanks!

Thanks for the reply Vin. Any progress on this issue? Note that widening a field does not work at all, even if I start with the cursor inside the field.

Hi,

You can refer to this post.
Issue when moving a field in the Form Designer - Support - Five Community Forums

Hope this help!

Thanks for the reply Vin. This does help, but any idea when the visual page designer will be working again?

Even though I am using the suggested technique with the display page, I am having an issue. Hopefully you can help me.

My Members form has a sub-form called Groups which displays a DataView to show which study groups the current member is involved with.

When I click one of the groups in the sub-form (configured as a button), it opens up a new form called GroupMembers. This is for editing purposes, since I can’t edit in a DataView.

My StudyGroups form also uses a DataView showing which members are in that group. It also, when clicking a member, opens up the GroupMembers form for similar editing.

The picture below is of this editing form in design mode. Note that it has a Group field and a Member field at the top.


The Group field has a showIf formula =(five.variable.ActiveForm == “Members”. The Member field has a similar showIf, but instead of “Members”, it contains “StudyGroups”.

My logic is: When showing the Members form and navigating to the edit form for a Study Group on the second page, I don’t want to see the “Members” field. Conversely, when showing the StudyGroups form, I don’t want to see the “StudyGroups” field on the edit form.

I’m not really sure if this logic is valid, perhaps I should always show both fields. However, right now that is my logic.

In any case, when I am viewing the StudyGroups main form, then click on a member in the next page, here is what comes up:

As you can see, the Member field is indented far to the right, and the Group field is correctly not showing. It would be to the left of the Members field.

Please believe me that if I run this from the Members main form, the Group field on the edit form shows up on the left of the first line.

So the question is, why is the member field indented past the “invisible” groups field? The Display tab in form design shows 0 PreWidth and 0 PostWidth for both fields.

I either need to solve this, or simply allow both fields to always show. I’m fine with that solution if you can assure me that if I happen to move the member to a different study group, or the study group to a different member, everything will work if I save the record. I am not sure it will work. What if I am in group 1 and group 2. Then I edit my Member record and bring up the edit form by clicking “Group 1” button. the edit form pops up and I change “Group 1” to “Group 2” in that edit form. When I save the record, wouldn’t that cause a conflict, since I’m already in Group 2?

Thanks for reading this somewhat verbose question.

I decided to simply show both fields in the GroupMembers form. Please see the following screen shot, which is from the Setup Members form. My record is visible, and I’ve scrolled the screen so you can see I am in 5 groups.

When I click the first item in the DataView, I get this:

When I click the drop-down for Group, I have the opportunity to change this study group (Book Brothers) to another group. It looks like I can select the group “Gadabouts” from the drop-down. This should NOT be permitted, since the first screenshot shows I’m already in Gadabouts, and this field is _LookupUnique. The lookup is based on the StudyGroups table, but the record being edited is in the GroupMembers table. So it appears _LookupUnique is not working the way I thought it would.

What is the best way to handle this issue?

I’m willing to not allow edits to this table, and require deleting the existing record (which I can already do by clicking Edit, then clicking trash can).

I still need the form to be able to add a new record to the table. Haven’t put that in the application yet. I need an “ADD” button (either in form header or as a separate control on the form itself). The ADD button would open this same GroupMembers form in add mode. So I need to figure out how to differentiate between opening the form for editing by clicking on a study group in the data view, and opening it for adding by clicking an action button.

Can you suggest how to differentiate between these 2 modes, so I can make the Study Group drop-down and Member drop-down disabled in case of editing, but enabled in case of adding a record?

Also, please advise if there is a better way to accomplish this task in Five.

Thanks so much!

UPDATE:

I’ve added an action button (Add Study Group) to the members form and made it visible only when the Groups page is selected. I also added an action button (Add Member) to the StudyGroups form, and made it visible only when the Members page is selected. So far so good.

I need a function to execute when I click the Add button, such as AddGroupMember. I need to set an AddMode variable to true, open the GroupMembers form, and in the form’s code somewhere, if AddMode variable is true, cause a new record to be added to the StudyGroupMembers table, including setting the primary key GUID value.

Can you please help with this function, which should probably be triggered by the On Show event? Please let me know if there is a better way to do this process of adding a new record.

NEW UPDATE:

I can’t figure out how to programmatically open up a child form for adding a record. My Members form, as mentioned, has a data view for the Groups page, showing which study groups the member is in. When I click the StudyGroup button, it opens that record in the GroupMembers form, for editing. This works just fine. Now I need to be able to add a new study group to the member. The Members form has an action button to “Add a Group”.

I’m trying to figure out how to navigate to the GroupMembers form in “Add” mode, so I don’t have to click the + button to add the record. Everything I need to know to add a record is known at the time I click that button. How can I tell a script to add some field values to a context object, then open the form in add mode with that context known? I’ve been using ChatGPT, which “thinks” it knows how five works, but it doesn’t. It’s helped me on other things, but every suggestion it gives me doesn’t work in Five. So is this possible? It’s not realistic, when looking at a member and their groups to need to navigate directly to a GroupMembers form, then click + , then re-enter the memberKey and StudyGroupKey, then save the record.

Much better would be a way to run a function which adds the record to a new GroupMembers record. I don’t want to run SQL to add a record to the StudyGroupMembers table, in case the user accidentally clicked the action button. Then I would need to delete the record they didn’t want to add.

ChatGPT thinks you can insert a record then navigate to the form in add mode, and the record will be there, not committed until I click the Save button. I can’t make this work with their code samples, but this would be optimal if it could be done.

Can you help with this use-case? Thanks…

Hello,

If you know the required fields upon clicking the add button, would you be able to set these as variables? You could then set the default value of the corresponding fields to equal the variable that was set upon clicking the add button. If the form that opens upon clicking the add button is also used in other areas of your application, this could prove to have some functional errors. In that case, you would need to create a seperate form which is identical to the form presented when clicking the add button, however, adjust the default values of the fields in the new form to correspond with the previously set variables. When clicking the add button, you can then select the new form rather than the old one.

Hope this helps,
Thanks,
Riley.

Thanks for the reply, Riley. I’m not sure I properly stated the issue, based on your reply. The question is not how to get the values into the form fields, I think I can do that. the problem is how to click an action button on one form (the parent form), and have the desired detail form open up in add mode, as if I had opened the form normally and clicked the + button above the list.

There must be a way to open a form already in add mode so the user can supply any values not already supplied via context items or five variables.

Ideally, I would like to fill a context object with the desired variables, and when the edit form opens in add mode, the context would be available. Alternatively, I can have the parent form’s script set variables, then on the edit form’s onShow event I can fill the fields.

Is there any way to open the form in add mode as if I had clicked the + button on the newly opened form? This seems like a reasonable use-case.

Thanks…