How do I save information of multiline input?

Hi I’m using bunch of “multiline input” so that users can create their own courses. Two things:

  1. How do I make anything written on “multiline input” be saved ? If it’s just a “input” then I know if I press enter, then it would change the value of the “input”. With “multiline input”, not sure how to do that.

  2. How to leave the saved info on the page when user comes back. I want users to come back to the page occasionally whenever they have something to change, and I want all contents to stay there.

  1. Multiline input functions the same as a standard input, so just use the same workflow you’d use for a standard input element.

  2. Set the input’s ‘initial content’ to be the data from the database that you want to display - probably your input is inside a group, and that group will have a content type and a data source, so set the initial content to be the parent group’s ‘field you want to display’.

Thanks Adam for your reply. It still is not clear for me – so every time I press “enter” while typing in multilineinput, it will automatically save the data?

If you’re using ‘autobinding’ then you don’t need to press enter to save (it saves as the user types).

If you’re not using autobinding and you want to save the changes when a user presses enter, you need to run a workflow to make changes on the database when the input’s value is changed.

That applies to both standard and multiline inputs.

Thank you so much. It helped me understand.

It pretty much resolved the problems, except that when I come back to the page / refresh it, it would not display any info because I couldn’t set up the specific data of ‘type’ of the page.

I want it to show a specific data of the ‘type’, so that when the user comes back, user will see their previous saved version of the page.

Do you know how to resolve this?

Use the ‘initial content’ input on the multiline input:

Set the value to display whatever data you want it to display (i.e. the user’s saved data).

If it’s tied to the current user (which presumably it is), then select 'current user’s and then select what data you want to display.

So this page

's page type is “Camp”. This “Camp” has to be created by a “User”.

A new Camp is created when user inputs the first field. It will also save the camp name in the User database using “make changes to user”.

Only once the first field is filled and a new camp data is created, it will have set the “Current Camp”.

However, when the user comes back to the page, it will not recognize which camp the user created. It will be blank. …

I want the page to recognize the user and display the camp data that user has filled in previously.

How are you sending the ‘camp’ data to the page?

Assuming the page’s ‘camp’ is related to the current user, you can just use current page’s camp as the data source.

Or if it’s not then you can use current user’s camp (assuming the camp is connected to the user).

And if it’s not then you’ll need to do a search for 'camp’s with a constraint to match it to the current user.

It all depends how your database is structured.

Thanks Adam.

How are you sending the ‘camp’ data to the page?

This is exactly what I’m unsure of. How do I set up a page’s ‘camp’ data?

You probably don’t need to have a content-type for the page, unless you’re intending to have a an individual page for every camp in your database? If you’re displaying all your camps on pages on your site for example.

But even then you won’t be able to display camp data for a camp that doesn’t yet exist (as is the case in your example above).

Regardless, the simplest way to do it is by using the current user (assuming the user is linked in your database to the camp).

So just reference the ‘current user’s camp’ in your input’s initial content. (or better still, assuming the inputs are in a group, set the group’s content to the current user’s camp, and then set the input’s initial content to the parent group’s camp).

This topic was automatically closed after 70 days. New replies are no longer allowed.