Inserting Dynamic Data into multiline input Front End

Hello,

I am trying to write a contract editor, where the user can edit contract terms etc., but I am strugling with inserting dynamic data into this. I have tried the “Insert at cursor point” plugin, but it only insert the texts, which is not updating dynamically.

The idea would be that the user writes the standard text and then insert a dynamic field from a button or buttons depending on what needs to be inserted such as start date end date etc.

Does anyone have a solution or workaround on this?

I didn’t understand.
So how the text is beeing inserted and the multiline is not beeing updated?
If the text is beeing pasted where you want, than the multiline’s text is beeing updated, no?

Do you want to create “template” and replace tags with the correct value?
Example: User have a template Hi {{name}}, your contract will begin on {{start_Date}} and end on {{end_date}}.

Maybe my explanation was not clear enough.

I want to create it as in the example lined out by Jici, but I want the user to be able to create the dynamic input such as {{name}} etc. on screen via buttons that would insert this field into a multiline input, or something similar.

I can create it in the design editor, no problem, but I need the user to be able to insert these dynamic fields themselves, and not having to send me the text, and I populate and insert the dynamic links.

Yes this is possible.
I have worked two weeks ago with someone else on a similar case. The user create “variable” that are number. (let’s say var1, and var2). Var 1 value is 50 and var 2 is 35
And in var 3, instead of a number, it’s a function like var1+var2 (a little bit like excel). The user use a dropdown and Insert at cursor position" to insert the “var” into the function. But… we needed to create another plugin to find and replace the var by the value of var1 and var 2 in var3. Actually it’s not available on plugin store because I didn’t get time to test enough and investigate it there’s enough user to publish it (and support it). But if this is something that can work for you, I could consider sharing it with you as private and you can test it.

Why don’t you just use the : find & replace function to replace the tags by the value you want?

Just because it’s not predictable how many var needs to be replaced and with which value. (Or would be possible using a kind of “loop” function)

Hi Jici,

Yes, I would like to test out the plugin, if you don’t mind sharing it.

Thanks
Per

Send me a PM with your app ID please.

The tags are going to be created by the client, correct?
And who is going to replace the values from the tags?

Like, the client creates a tag called {{name}}.
Who is going to tell that {{name}} should be replaced by “Jici” ?

I guess this option would work, and then the tags could be inserted, and once the values for the tag is updated, it could replace the tag with the correct value.

I think the problem would be if the user decides to alter the contract after the tags has been replaced, then it would be a manual task to go through the already replaced tags

Every tag created by the user 1 is saved in the database, vinculated with that particular contract.

When user 2 opens the contract, Bubble can load all the tags vinculated to this contract in a repeating group with an input beside, so user 2 can inform the values of each tag.

Everytime the input is changed, Bubble can run a :find and replace to replace the tag from the RG’s line by the value inserted by user 2 in the input field of the same line.

It should work.

1 Like

With the value in DB related to this tags.
The DB need to be structured with a list of object/value. This is why a dropdown can be made to list the object the user can access and insert into the string.

I like this idea when the text is created before, it make sense totally.
But when the text is built after like the case with a math expression, you need to do it using a loop or the plugin :wink:
@pfthiessen So according to your case, both options are possible (and maybe you will use both too :wink: )

@rpetribu I’m thinking of a possible issue however. What if the user replace one field, but edit it after … you will not be able to use the find and replace again on a tag already replaced. And if you think to store the original text into another field you will need to reprocess all tags again. There’s some limits on this idea I think.

You are absolutely right. But is something to start with:

https://www.loom.com/share/f94ce4fe551549bbb4108e2635a9d616

1 Like

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