Transfering Data From One Field To Another

In the photo above there are 2 sections (the art style, and the prompt text box on the right side). What I am trying to do is the following. If the user clicks 3d Render on the left side for example, then the word 3d render will be added to the prompt text box on the right side, but I want the text to be invisible so that when the user types in the prompt text box they don’t see the text already there. For example, if a user clicks “3d render” and in the prompt text types “a green boat” then the prompt will have the value “a green boat 3d render” but the user only sees the text “a green boat”

Hi there, @rohanphilip1108… if I understand your post correctly, can you store the text from the left side in a custom state and then append the custom state’s value to the input’s value on the right?

Best…
Mike

Ok. Im a bit new to custom states so i’m not exactly sure how this works but let me know if this is right. So I save the left side’s text in a custom state and then append it to the right side’s text value, and it will be invisible? I tried doing something like that without custom state but the text was still visible. Im a little confused but thanks for the help

What is the point of the text being added to what the user types on the right if the text isn’t visible? Do you need to use the user’s text plus the text from the left to drive some sort of functionality? My point is that it doesn’t seem like you need to have the text in the input if it’s going to be invisible. Just append the text to the user’s input whenever you do whatever it is you are going to do with the user’s input.

I’m using Dalle and want to make the prompt as simple as possible. So by splitting it into different categories, it will make an easier UI. So users only type something simple, but will get an advanced generation because of the preset options. That’s why I want it to be invisible so it will be as simple as possible

Okay, so when you get the advanced generation (whatever that means), append the custom state’s value (i.e., the selection from the left) to the user’s input on the right.

Is this how it works? Style Value is the custom state I set but I dont think it is paired to the value. Do you know how to connect the Style Value (the custom state) to the Input Any Style Here’s Value (the text box on the left side). Sorry if this is a beginner question.

It’s not necessarily a beginner question, but there is a disconnect here, and that might be due to me not understanding what you are actually trying to do. If I do understand it, though, I think you need to stop thinking about adding the text from the left into the input on the right. Instead, append the text on the left to the user’s input on the right when the Create button is clicked. In other words, you are obviously doing something with the user’s input when the button is clicked. So, whatever you are doing with the input’s value, do the same thing, but use the input’s value and append the custom state’s value to it.

Here is a simple example… let’s say I create a custom state on my index page, and the custom state is called art style. Also, let’s say I have a user input called Input A. First, leave Input A alone and just let it be the input into which the user types something. Then, when the user clicks the create button, use a value of Input A's value:append index's art style to do whatever you are doing when that button is clicked.

Oh thanks I think that would work. Would I change that in the workflow? I’m trying to find where I would append once the button is clicked, is it under Data?

You would use the value in a workflow that runs when the button is clicked. What are you actually doing when that button is clicked? Do you have a workflow set up? If so, can you share some screenshots?


Here is my workflow. First it shows an alert message saying “Image Loading” then it contacts OpenAI to generate the image. Returns it to an image element. The last step is another feature that isn’t related. So I am guessing that I would append it as the first step.


Where would I find the append action? Is it under data?

It’s not a workflow action. What does step 2 look like?


Step 2.

If the Prompt Bar's value is the user’s input, click on value, click More, and then you should be able to select the :append option and append the custom state’s value to the prompt bar’s value.

I just changed that and it works! Thanks so much for all your help and patience with my confusion. I tried fiddling with this all day, thanks so much bro :smiley:

1 Like

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