rushy Posted March 13, 2022 Share Posted March 13, 2022 Hello. I have an image field on my page and was using the default description field to hold some text relating to the image. However I decided that I would sometimes like to store a longer text description such as an article about the image, for example a text several 1000 characters long. So I defined an image_fields template and added to it a text_article field of type textarea and tried to store long text there but it gets truncated around 200 chars, I can see that in Adminer. Any tips on how I should go about this? Thinking some more about this, perhaps I should just store a text document somewhere and reference it from PW, rather than store the text in the database, store a link to a document. Any comments on this? Many thanks - Paul Link to comment Share on other sites More sharing options...
BillH Posted March 13, 2022 Share Posted March 13, 2022 As far as I know, your text_article custom field should work without problems (so long as it's not a CKEditor field, which won't work as a custom image field). The only thing I can think of right now is checking that you haven't got a maximum length set on the field (Input tab). If you need text formatting in your articles (which seems likely with long text) and don't want to use Markdown, you'll need to use some other approach anyway. If there will always be just single images on your page, you could simply add a field to the page. But if there could be more than one image, you could use a Page Reference custom field and store each article in a separate page. 1 Link to comment Share on other sites More sharing options...
rushy Posted March 13, 2022 Author Share Posted March 13, 2022 SOLVED! My custom image field was working fine, I simply did not realise that Adminer truncates long text at 200 chars! It has to limit the display at some point and I should have guessed that. Anyway it seems to be storing my long text fields correctly as I just stored and then retrieved 612 char text so this bodes well. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now