Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#925 2011-08-25 03:07:03
- Teemu
- Member
- From: Shanghai
- Registered: 2010-04-27
- Posts: 60
Re: glz_custom_fields
Didn’t want to revert, so removed the second body field with javascript:
$("p.body:eq(1)").remove();
Not pretty, but seems to be working for me.
Last edited by Teemu (2011-08-25 03:07:35)
Offline
#926 2011-08-25 03:23:37
Re: glz_custom_fields
Does it work when editing content? I removed the first body field with CSS. When I tried removing the second one, content edited in the visible field would not save.
Offline
#927 2011-08-25 03:34:52
- Teemu
- Member
- From: Shanghai
- Registered: 2010-04-27
- Posts: 60
Re: glz_custom_fields
Sure John, saving works. With css you only hide it from eyes. With jquery remove method, it will be removed out of the DOM.
Offline
#928 2011-08-25 03:38:21
Re: glz_custom_fields
Thanks Teemu! Great work-around!
Offline
#929 2011-08-25 03:58:28
Re: glz_custom_fields
BTW, Teemu— you can also track this issue on Github, and report additional details if you wish.
Offline
#930 2011-09-01 19:33:48
- ploinkr
- Member
- From: Montreal
- Registered: 2007-12-06
- Posts: 83
Re: glz_custom_fields
Hi, just wondering: I’m using the Date Picker for certain fields; can that be used to sort articles by the date entered (and not just numerically?) Doesn’t seem to work so far… Thanks!
Offline
#931 2011-09-07 18:32:16
- ploinkr
- Member
- From: Montreal
- Registered: 2007-12-06
- Posts: 83
Re: glz_custom_fields
Anyone…? Gerhard? Would me most grateful…
Thanks,
B.
Offline
#932 2011-09-07 18:42:31
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: glz_custom_fields
Try this way:
Plugins > glz_cf > Options <click> Date Picker > Date format > yyyy-mm-dd
That’s the only way I see offhand.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#933 2011-09-07 19:18:26
- ploinkr
- Member
- From: Montreal
- Registered: 2007-12-06
- Posts: 83
Re: glz_custom_fields
Thanks so much Uli, going to try that (seems obvious now!)
- yep, working – thanks a lot! :-)
Last edited by ploinkr (2011-09-07 22:16:17)
Offline
#934 2011-09-07 19:34:32
Re: glz_custom_fields
I am faced with the same requirement to sort by the glz_cf Date picker date and can use the yyyy-mm-dd format to select the date but I also want to display the date in the article in the dd-mm-yyyy format. The only way I can see of doing that is to have two date fields, one in each format. Is there a better way?
Last edited by joebaich (2011-09-07 19:48:03)
Offline
#935 2011-09-07 21:04:26
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: glz_custom_fields
joebaich wrote:
Is there a better way?
Hmmm …
aam_split_cf and sed_packed_custom_fields come to mind.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#936 2011-09-07 21:59:51
Re: glz_custom_fields
I am faced with the same requirement to sort by the glz_cf Date picker date and can use the yyyy-mm-dd format to select the date but I also want to display the date in the article in the dd-mm-yyyy format.
Easier still: use the “yyyy-mm-dd” format for sorting and a php snippet to display it in another format. Something like:
<txp:php>
$orig_date = custom_field(array('name'=>'custom-field-name'));
echo date("d-m-Y", strtotime($orig_date));
</txp:php>
Further information about php date formats here.
TXP Builders – finely-crafted code, design and txp
Offline