Forum Academy Marketplace Showcase Pricing Features

Text Field Rotation/Deletion

Hi! Trying to figure out a way to perform the following function:

  1. User enters text into an input field
  2. User presses button to submit the data
  3. A new display text area is created displaying the original entered text data (while ‘cleared’ text entry area remains visible)
  4. User can repeat
  5. After a set number of ‘added’ display areas are created the ‘oldest’ one is no longer displayed. This list can be continually populated with new text fields and the oldest will continue to drop off.

This could be thought of as a to-do list that only keeps the first ‘X’ number of to-do items, and then continually deletes the oldest as a new one is added. All on one page, AJAX-like.

I’m new to the bubble.is platform; looks really intriguing! Thanks in advance for any responses.

Hey @remdim, welcome to Bubble!

Here’s a quick overview to achieve this:

  1. Add the following elements to the page: input, button, and repeating group with a text element inside the cell.

  2. When button is clicked, create a new Thing. I’ll use a sample custom data type called City and a text field within called Name. So, when button is clicked > create a new City > name = input’s value (the input on the page)

  3. Add another action after the creation to reset the input (clear it). It’s under element actions.

  4. The repeating group’s type = City, and the source = search for cities. The text inside the RG cell is “current cell’s city’s name”. So up to this point, you type in a city name, click the button and a new city will get created with that name. The repeating group will display the list of all cities created.

  5. To remove the last item in this list after it has reached a certain number of entries, you can do 2 ways: either delete the oldest record when it meets that count or just set the repeating group to show a fixed number.

5a. To delete, create a new workflow “do when condition is true (every time) and when search for cities: count is 10 [or whatever your limit is]” > delete Thing… define which thing with “do a search for cities : first item” (If I remember correctly first item should be the first entered and not the most recent, but you can check)

5b. To show a fixed number of cities but still keep those city entries in your database, change the configuration of the repeating group in its property editor: fixed number of cells.

Hope this helps!


Gaby | Coaching Bubble

1 Like

Awesome; thanks! This was exactly what I was looking for. I appreciate the fast and accurate response!

1 Like