How do I create a custom form?

nevermind found the CLEAR VALUE so I cleared the values and it’s working perfect

it’s a little buggy that you can see the overlay disappearing with the legend ITEM ALREADY EXISTS lol… I’ll see how I can make that transition prettier

but this is amazing

You can try it out https://surjet-inventory-9ly9.glide.page and go to GULFSTREAM GV and ADD an item there, you’ll see that when successful there’s like a little bug that shows the screen with the legend “item is already added” while closing the overlay

Trying to find a workaround that so that it doesn’t feel buggy, but apart from that it works pretty cool

It’s a bit hacky, but I think what you could do is write the current timestamp to the inventory table when you add the row. Then create a math column in the inventory table that adds maybe 2 seconds to the timestamp. Let’s name it ‘Time+2’.

Date+2/86400

If you are using a relation in your working table, you could replace it with a Query column and set the query to filter by aircraft ID as well as ‘Time+2’ is before Now. That should delay the ‘item already added’ message from showing while the form is closing.

you’re right sounds hacky lol but I got your idea and might work, i’ll try it out !

I don’t get why it has to even been shown that screen if I am asking glide to close the pop up entirely, i think it’s a bug… the action should just close the window the way it is, but glide goes back and then closes

I’ll try your solution to see if feels better

thanks

@Jeff_Hager check it out now! I found an elegant solution

Instead of preventing the user to add the existing item, I let him try and a new screen tells him that the selected item can’t be added because it’s duplicated so go back and try another

when sucessful, it just adds the product seamesly

It feels natural what do you think?

1 Like

That looks good!

1 Like

Thanks for all the help, it was crucial ! I wouldn’t have been able to do it on my own

1 Like

Hi @Darren_Murphy Darren, im new to Glide and based out of SG too! I’d like to understand how to create a Custom “edit” form on a Detail screen?

Tried taking a look at your example app and it’s exactly what I need but im not sure if I can copy the app and take a peek at the data/actions table now

Any help or links to resources would be appreciated! Thanks alot

What I usually do is re-using the custom form you likely used for the add operation.

On entry to the custom edit screen, set all the values of the current record to that screen, and also the ID of the current record.

Then have a button for the “save” function, setting the edited values back to the original record, through a relation using the record’s ID.

If you plan to have both add and edit as custom forms, use “show details screen” for both to save yourself time.

2 Likes

Is there anyway you could share a remix link or somthing to this project?

Which part are you getting stuck with? Can you share what you have configured so far?

i am getting stuck with displaying a message to say that the username is taken - it only displays once the user has his submit… is there anyway i could you values from screen or something else to make sure this is live? or anyother way to top the user from going forward without a unique username. i have mad a custom form page btw

You mentioned a “submit” action, is it still a normal form or is it a submit action you created yourself?

Have you created a relation to check whether the entered username is taken?

Can you show some screenshots or a video recording using Loom?

1 Like

Hey @Darren_Murphy, is there any chance you could share a remix, duplicate or even just a Loom video explaining and showing the back workings of Custom Forms Concept ? I am just so annoyed on trying to figure out how you got the “make sure there is no duplicate names” thing working. This would be VERY much appreciated :sweat::sweat::pray::pray::pray::pray:

The table

  • Create a new table.
  • Add one user specific text column to that table.
  • Add a relation column linking the user specific column to any other table column where you want to check for duplicates.
  • Make sure you have one row in the table.

The form

  • Create a screen sourced from that new table.
  • Add a text entry component and link it to the user specific column.
  • Add a button with an Add Row action that will write the user entry to another table.
  • Set a visibility condition on the Add button to only show if the relation is empty.
  • If you want, you could also show a Hint component if the relation is not empty, saying that a duplicate exists.

That is a custom form at a very basic level. Just a detail screen with entry components. The relation should only return result of it finds matches from rows that already exist.

3 Likes

Thank you sooooooooooooooooooo much @Jeff_Hager !!!

1 Like

I created a new concept App, which is available as a template. See updated link in my original post.

2 Likes

thanks again @Darren_Murphy really appreciate it :pray:

Hi, i can’t seem to create a copy of your template. Is there any other way to access it? Thanks a lot!

I just tested, and it copies correctly. Make sure that you are already signed in to Glide, and that you are using the correct template link.

1 Like