App Connect Bootstrap 4 Form Generator - using text area / medium editor

I have a single database table that has two text fields that contain html formatted content.

I have looked at the tutorials and credited an update action and then used the Bootstrap 4 Form Generator. If I accept all the defaults then I have a form with all the fields included - my two fields with html content are created as text input.

I would like to be using either a text area or even better the medium editor for updating these fields. I have tried various options (e.g. changing the “type” to text area when using the Generator) but without any success. When doing this then no updates are made to the database.

Similarly I have not been able to get “inner html” to work if I try to update the dynamic attributes even with the default generated form.

Can anyone help please ?

Hello,
In the form generator set your form field(s) to textarea. Then on the page select the textarea and click the “Enable Medium Editor” button in the properties panel. This will enable the medium editor in your textarea.

Hi Teodor, I have done what you suggested but now the Save button does not update any of the database fields. Additionally I don’t see the contents of the Description field in the Medium editor before doing changes & using the Save button.

I have included screenshots of the different stages.

update-5

Are there any errors in the browser console, when you load your page in your browser?

Yes I am seeing - MediumEditor is not defined at base.js:1 and then Unknown component found ! medium-editor.

update-6

Then please check the medium editor js includes in the page <head>
They must be in this order:

<script src="dmxAppConnect/dmxMediumEditor/medium-editor.js" defer=""></script>
<script src="dmxAppConnect/dmxMediumEditor/dmxMediumEditor.js" defer=""></script>

Yes they were in the wrong order - see the screen shots. I have fixed this and now the console has no errors but says “value null - mediumEditor.js.107”

But the form is not updating the database (both for the Text Area or any of the other fields)

head Before

head After

Do you see the dynamic value in the medium editor, when you load the page?

On the web page I am seeing the dynamic content - but it looks like a normal text input field and not the Medium Editor (or text area).

However in the App structure all looks OK with “Medium Editor Textarea: inp_Description”

What do you mean by: " it looks like a normal text input field and not the Medium Editor (or text area)." ?
Have you tried to select parts of the text wit your mouse, so that you can see the editor options?

You are right - I can select part of the text and I am seeing the attributes from the medium Editor.

However the Save button does not cause any updates to happen.

Then … please follow this tutorial:

Done as you suggested - working now ! The update action was missing. Many, many thanks !

Going back to the first issued (scripts in the wrong order) - what might have caused this ? I thought I had created the page in a completely standard manner.

1 Like

It can happen if the components are added, removed and re-added multiple times I think

Brian, many thanks - I have found your videos very helpful.

2 Likes

More to follow soon when i get over my man-flu, cant talk properly at present!

2 Likes

I’ve always assumed this was a bug which was waiting to be fixed. The issue has cropped up quite a few times.

If you select a textarea and click ‘Enable Medium Editor’, there’s no problem. If you select Medium Editor Textarea or Region, from the Elements panel, the files are listed in the wrong order.

Hey Tom,
Can you explain the exact steps to reproduce this, in a separate Bug report topic?
We’ve not really been able to reproduce the issue, but if you know when exactly it happens we will be able to fix it.

Bug report added.

1 Like