<
blockquote author=”Will Smith” date=”1214986070”>Hi all -
We’re using the fantastic Multitext extension. It’s awesome. BUT, we’re having a problem.
Adding HTML hyperlinks to any of the cells in a Multitext field doesn’t work. For example, if we input the following in one of the fields:
<a href="http://www.google.com/" title="Google">Google</a>
It comes back out of EE like so:
<a href="http://{url_field}%22>Google</a>I" title="{title_field}">{text_field}</a>
Hi Michael:
Thank you for the reply.
But I feel like your suggestion could get pretty unwieldy. What if, for example, we wanted to add two links to a Multitext cell? I don’t think we’d be able to with your method. Also, how would we indicate the word or phrase in the Multitext cell that should be linked? It would have to be with some markup, but if we’re going to use markup, why not just have HTML itself do it?
At the end of the day, I just feel like Multitext should probably support the capability to allow HTML links within the cells, and that I have encountered a bug. Is there no other simpler workaround?
OK, by slightly modifying the extension I was able to get this to sort for me. You can see my two columns in the CP (attached pic). The first column is the sort number, and the second column is all the info for that ‘entry’ (which may look a little cryptic to people who don’t follow professional bass fishing 😝 ). I as able to do a numeric sort by changing the extension slightly, like so… Around line 469 find:Add the following line directly after that, and before the “preg_match_all” line:$row_data = array(); if(isset($row['field_id_'.$f['field_id']])) { $row_data = array_filter(preg_split("/[\r\n]{2,}/", $row['field_id_'.$f['field_id']])); }
That’s all I did and it seems to be sorting OK with no leading zeros needed. I hope that’s all I needed to do. I would rather do this on the template so that if I want to make another multi-text field and don’t necessarily want it sorted this way, I’m free not to. I’m using PHP on the template to explode col_2 on the pipe-delimiter. You can see the output in the other attached pic.asort($row_data,SORT_NUMERIC);
Hey mdesign, i’ve been looking for a way to control competition results for a Golf Club site that a client will be updating and this looks like the answer (thank god) i’ve been after. I havn’t had a chance to install this extension yet (site is still in early design stage) but on the screenshot above I noticed the little (+) at the bottom - does this add a new line, and is it part of the extension? Or did you add it in that functionality yourself?
Thanks,
Birdie
You got it place the following around your <ul>I haven’t come up with a way to check individual columns yet., but i’ll investigate.{if members!=""}...{/if}
I know this is a bit old now but is it possible to check per column?
I have tried -
{if col_1 != "x"}{col_1}{/if}
and
{if "col_1" != "x"}{col_1}{/if}
But neither seem to work. Any ideas?
Hi,
This extension is great, i’ve hit a couple of issues with it - specifically the ‘edit’ bug with empty columns - but nothing big.
I have hit a bit of a problem with Multiple Site Manager though. I installed MSM after the main site was complete, in order to provide a Test site for the client to train on etc. None of the data from the Multi-text areas duplicated to the Test site - which isn’t a huge problem because it’s for training only. However, when I add new articles with Multi-text areas in the Test Control Panel the multi-text info doesn’t appear on the front end.
I have checked all my field names etc. but can’t see the problem - all other info from the article is present and correct. I imagine it’s because Multi-text creates it’s own table in the DB and MSM doesn’t know about it to duplicate / set up a new one? (I am completely guessing at that, by the way - MySQL / PHP are not my strongest skills!)
Has anyone hit this issue before and found a fix?
Thanks!
hi there,
is there a way to check for the numbers of entries in the matrix?
like {if count == 0}do something{else:if count == 1}do something else{else}do it{/if}
I’ve looked through the whole thread, and see neither a request, nor a solution, nor a parameter… in fact the only parameters I see is: limit, backspace and col_name
maybe there’s a EE native solution that I’m missing?
cheers stefan
hi there, is there a way to check for the numbers of entries in the matrix? like {if count == 0}do something{else:if count == 1}do something else{else}do it{/if} I’ve looked through the whole thread, and see neither a request, nor a solution, nor a parameter… in fact the only parameters I see is: limit, backspace and col_name maybe there’s a EE native solution that I’m missing? cheers stefan
I don’t think there is. The only time I needed to use conditions with Multi Text was when it correlated with a File field. I stored all the columns in an array via PHP and refer to it in a File tag pair via an index of {count}-1.
sample code (PHP required, set to output) project_gallery_alts is a Multi Text field, files is a File field
<?php $gallery_alts = array(); ?>
{project_gallery_alts}
<?php $gallery_alts[] = '{col_1}'; ?>
{/project_gallery_alts}
{project_gallery_files}
{file_url}
{/project_gallery_files}
</div>
I have sort of a unique use for this extension, I think. I use it for a field that lists tournament entrants for different four-day tournaments - and their position (order) can change from day to day. There are only two columns right now, but the client would like to add four more (to record each entrant’s daily scores over the course of the tourney). Altering the position of the entrants daily will be a bear for the client with 6 fields for each entrant and a variable amount of entrants shown (usually top twelve or so). Instead of having my client cut/copy/paste info up or down, would there be a way to re-arrange the rows with AJAX in the CP? I see there is a delete row link already there - so I wonder how feasible would it be to be able to drag the rows up and down to rearrange the order in which they’re saved to the DB and output on the page? Or…(just had a thought related to a previous post here…) is it possible to sort the output by the contents of one of the columns? If so, my client might only have to change the first column (a number) in the CP, and then the field would be output by that order. Or, if there is a different way other than multi-text to output a variable amount of entrants and easily rearrange their order on a daily basis, I’m open to that suggestion. I’d rather avoid a whole other weblog with related entries, as that seems overly complicated for what this is. I was thinking of just one textarea with one entrant per line - but I think I’d have to include some HTML in that textarea which might confuse the client. I’d rather stick with something like multi-text, because the client only has to worry about the actual content of each field. Thanks for any suggestions.
Long overdue and this certainly doesn’t grant you the ability to sort not via javascript nor PHP (as per the method you suggested) but this is something I worked on in my first EE project. A modified version of Multi Text that you can shift rows up and down by clicking the links (didn’t want to get into drag and drop as that would involve introducing a javascript framework which might mess up anything else going on…), add rows on the spot, has a little room for the green arrow icons from textarea resizer, tries to automatically resize textareas based on an arbitrary # of characters (editable in settings), can choose which default text substitutes an empty column (in the template it can be referred to as {empty_col} so by default “{empty_col}” is “-“), and uh… I don’t recall why I changed the internal delimiters between columns but I did and those are also editable.
I did edit textarea resizer to add a sort of play nice option with this so I don’t recall if the original will result in an error or if there is a dependency or what. (I’ll be glad to fix it though.)
I’ve attached edit entry and extension settings screenshots as well as the extension/lang files.
edit: removed the extension in favor of LG’s data matrix (also had to edit it to add a hidden field to set its type to none as per changes in ee1.6.5+) (but if anyone wants it i can upload again)
notacouch– have you seen LG Data Matrix, which has that functionality built in:
http://leevigraham.com/cms-customisation/expressionengine/lg-data-matrix/
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.