We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Multi Text

Development and Programming

Mark Huot's avatar
Mark Huot
587 posts
16 years ago
Mark Huot's avatar Mark Huot

Alright, I have another extension with gives you control over matrices of data. It was developed to hold information for a variable number of committee members positions. The number of columns are customizable in the extensions settings, as are the labels for the columns.

For a little more control replace the number of columns with a space and the labels with a space. Then in the edit field page change the field type to a text field and enter the number of columns you would like in the textarea rows. Then change it to a drop-down list and enter your labels in the drop down list box. Finally change the field back to a multi text and you’re done. Field specific settings.

Also, the template for this field is a pair and should look as follows (assuming my field name is {members}):

<ul>
{members limit="50"}
<li><strong>{col_1}</strong>: {col_2}</li>
{/members}
</ul>

<ul>
{members col_1="Mark"}
<li><strong>{col_1}</strong>: {col_2}</li>
{/members}
</ul>

Update: You can now use the backspace=”x” attribute like in weblog entries tags.

       
Ronny's avatar
Ronny
83 posts
16 years ago
Ronny's avatar Ronny

Oh wow!! I’ve always been looking for something like this, but ended up with tables inside a text-field. I’ll use it for future development. Thanks a lot!

       
maleika's avatar
maleika
26 posts
16 years ago
maleika's avatar maleika

This extension looks awesome! Thank you for creating it. 😊

       
sigork's avatar
sigork
155 posts
16 years ago
sigork's avatar sigork

1) There’s a bug – incompatibility with other extensions of yours (I don’t know with which of them, that will take another hour).

It works if there’re no similar ext’s. If I use it & resave the Article after enabling other ext’s, the data disappear in the Article, Drop-Down doesn’t work at all – it has only the first line with “1”).

2) How to use it similarly {if demo_extended != ""}?

(or to embed the option)

       
imagehat's avatar
imagehat
68 posts
16 years ago
imagehat's avatar imagehat

Mark, this a great extension, thanks for sharing so many great mods and exts.

One problem - for posts that don’t have a custom field set up with a multi text field, I was getting an undefined index error - index: field line :388

My quick solution was to check the query results and bail out in the modify_post() function that was throwing the error. Not sure if there’s a better way… but fyi:

$field_data = "";
        $query = $DB->query("SELECT f.field_id FROM exp_weblog_fields AS f, exp_weblogs AS w WHERE w.weblog_id=".$_POST["weblog_id"]." AND f.group_id=w.field_group AND f.field_type='".$this->type."'");
        
        if ($query->num_rows == 0)
        {
            return;
        }

-mike

       
Mark Huot's avatar
Mark Huot
587 posts
16 years ago
Mark Huot's avatar Mark Huot

I’ve fixed the undefined index error. You can get the latest version up top. Also if you’re using the “file”, “multi drop-down list”, or “checkbox” extension you’ll have to update them to fix the problem with saving that you were seeing. You can find the updates at their respective posts:

Checkbox: http://ellislab.com/forums/viewthread/38843/ Multi Drop-down List: http://ellislab.com/forums/viewthread/38370/ Multi Text: http://ellislab.com/forums/viewthread/39153/ File: http://ellislab.com/forums/viewthread/38997/

Or you can find a list of them on my docs page: http://docs.markhuot.com

       
Mark Huot's avatar
Mark Huot
587 posts
16 years ago
Mark Huot's avatar Mark Huot

sigork, I was able to use the extension in a conditional to check if it was empty just as you said:

{if mtext!=""}...{/if}

did this not work for you?

       
sigork's avatar
sigork
155 posts
16 years ago
sigork's avatar sigork

I think I understood now.

If I have

<ul>
{members}
<li><strong>{col_1}</strong>: {col_2}</li>
{/members}
</ul>

I should use

{if members!=""}...{/if}

P.S. I tried it in such a way: {if col_1!=""}…{/if}

Thanks!

       
Mark Huot's avatar
Mark Huot
587 posts
16 years ago
Mark Huot's avatar Mark Huot

You got it place the following around your <ul>

{if members!=""}...{/if}

I haven’t come up with a way to check individual columns yet., but i’ll investigate.

       
G - B - O's avatar
G - B - O
31 posts
16 years ago
G - B - O's avatar G - B - O

I was happy to see that you had updated the extension to get rid of the error. Only now i’m experiencing a new one :(.

Notice: Uninitialized string offset: 0 in /opt/guide/www.domain.com/HTML/login/extensions/ext.multi_text.php on line 355

Warning: Cannot modify header information - headers already sent by (output started at /opt/guide/www.domain.com/HTML/login/extensions/ext.multi_text.php:355) in /opt/guide/www.domain.com/HTML/login/core/core.functions.php on line 293
       
Mark Huot's avatar
Mark Huot
587 posts
16 years ago
Mark Huot's avatar Mark Huot

thanks GBO. That should be fixed now.

       
G - B - O's avatar
G - B - O
31 posts
16 years ago
G - B - O's avatar G - B - O

Great! I’ll give it a shot. (great ext btw!)

UPDATE: Installed and no more errors!!! 😊

       
imagehat's avatar
imagehat
68 posts
16 years ago
imagehat's avatar imagehat

Awesome, thanks for the updates Mark. I’m using your extension to build a product variation select list (large, medium, small etc) with the label, value, and image name (already existing) each in their own column. Works awesome. Now if I may just see if can just figure out a way to make one column accept images either from a file-like interface or the build in EE uploader.

Thanks so much again for releasing these to the community, great stuff and great inspiration for what can be done with such a flexible system.

-mike

       
G - B - O's avatar
G - B - O
31 posts
16 years ago
G - B - O's avatar G - B - O

Hi there,

I wanted to use this plugin to create flash slideshows with images and captions. I set it up to have three columns: images (wich contains a url to the images), caption_1 and caption_2. now when i submit a new entry, only the content of {col_1} stays, the rest disappears …

Have you heard about this before? How can this be fixed ?

       
Mark Huot's avatar
Mark Huot
587 posts
16 years ago
Mark Huot's avatar Mark Huot

Thanks for pointing this out. It stemmed from an error when custom (per-field) settings were used. So I’ve fixed that and also fixed a bug that occurred when you tried to preview an entry (all your data would disappear!). Like always grab the latest version at the top of this thread.

       
1 2 3 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.