Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#613 2009-12-02 05:17:44

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: glz_custom_fields

jstubbs wrote:

My countries list displays correctly in Extension > Custom Fields, but NOT in my form drop down field. Not sure why this is..

It’s not using a pretty display function on the default prefs page. On the plugin options page, the select values map to “ascending”, “descending” and “custom”.

…mem_glz_select sort errors…

I fixed mem_glz_select so it uses the same sorting logic as glz_custom_fields.

Offline

#614 2009-12-02 16:35:23

whaleen
Member
From: Portland
Registered: 2006-05-11
Posts: 373
Website

Re: glz_custom_fields

Re: Github: A thread for each issue is a step in the right direction IMHO and that is what we have over there now if we choose it. I’ve often though that some of the more popular plugin here in the TXP forums, for the benefit of devs and end-users, could use their own forum. The benefits are too many to list. There can be so many different topics that arise within one thread and the ability to sub-group them in my opinion would be really nice. Not only could these sub-threads be issue-related, as in support-related, they could also be based on implementations. If a group of users exists that tend to use the plugin for a like purpose they could pool discussion and you’d end up with sub-thread with a use-case quality to it.

Sub Thread types:

  • Feature Requests
  • Bugs / Issues
  • Implementations

Then your getting into sub-sub-forums… Maybe too far but still, an example of classification of the main discussion types. Maybe TXP could benefit from sub-forum with universal login solution for it’s plugins. You could do that here in the existing one and if there were the option to categorize new threads then you’d be set. Sorry to take that idea that far but it seems reasonable to me. Anyway it looks like Gerhard want to use Github and I went ahead over there to make a couple remarks on the issue posts he made. I support his choice to use Github because I can see how it will make things easier on everybody so hopefully others will give it a try to find out if it will work well overall.

Last edited by whaleen (2009-12-02 16:38:07)


txtstrap (Textpattern + Twitter Bootstrap + etc…)

Offline

#615 2009-12-03 15:27:53

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: glz_custom_fields

Anyone know how to set an initial blank value in a drop down select, forcing the user to choose an option?

Offline

#616 2009-12-03 15:40:01

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: glz_custom_fields

I though it did that automatically unless you specified a default value with {}?

Offline

#617 2009-12-03 15:45:21

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: glz_custom_fields

No, it displays the first value in the list. Would like the user to choose the option, as the form element is set to required="1". Otherwise its easy for users to make a mistake.

Also – anyone have success with the Date Picker on the front end? I don’t seem to have any luck (yet) getting it to work.

Edit: No need for help with the Date Picker, I figured it out…

Last edited by jstubbs (2009-12-03 17:15:30)

Offline

#618 2009-12-15 10:51:31

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: glz_custom_fields

Hi all,
How can I target whether a certain checkbox in a custom field of 4 checkboxes is checked (ignoring whether any other boxes in that field are also checked)? For example, I want to make a conditional statement always when value ‘foo3’ of custom_field ‘bah’ is checked.

I tried…

<txp:if_custom_field name="bah" value="foo3"><p>Do something</p></txp:if_custom_field>

…but that seems to fire if any value in custom_field ‘bah’ is checked, not just value ‘foo3’.

Any suggestions?

Offline

#619 2009-12-15 10:55:55

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,193
Website GitHub Mastodon Twitter

Re: glz_custom_fields

I tried…

<txp:if_custom_field name="bah" value="foo3"><p>Do something</p></txp:if_custom_field>

have you tried <txp:if_custom_field name="bah" val="foo3"><p>Do something</p></txp:if_custom_field>?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#620 2009-12-15 11:39:29

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: glz_custom_fields

Hi again,
Yes, that should have been val not value, thanks. I am still getting unwanted results though – it works fine if just that single value is checked in the custom field, but if other values are also checked it fails (probably because val would then equal “foo1,foo3,foo4” for example). Is there a way to ignore whether other boxes in the field are checked?
Cheers,
Phil

Offline

#621 2009-12-16 09:20:52

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: glz_custom_fields

philwareham wrote:

… Is there a way to ignore whether other boxes in the field are checked?

Hi,
I think rah_repeat can help here.
Have a look at the examples in the plugins page

Offline

#622 2009-12-16 16:00:49

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: glz_custom_fields

Hi redbot,
Not sure I can harness that plugin for conditional statements. I want the following kind of function: if checkbox 3 checked (irrelevant of whether other checkboxes within that custom_field are checked) then preform action.

Offline

#623 2009-12-16 16:21:40

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: glz_custom_fields

I suggest you to try the almost unlimited powers of smd_if. If not possible with smd_if, I’ll begin to believe that what you are trying is not possible. :)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#624 2009-12-16 16:50:44

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: glz_custom_fields

philwareham wrote:

Not sure I can harness that plugin for conditional statements. I want the following kind of function: if checkbox 3 checked (irrelevant of whether other checkboxes within that custom_field are checked) then preform action.

Yes, I have understood what you are trying to achieve and this can be done in a variety of ways. I tought the one I mentioned was easier than others as doesn’t imply the use of “txp:php” tag. Anyway the method suggested by maniqui should be even easier.
Try something like:

<txp:smd_if field="my_custom_field_name"
     operator="contains"
     value="my_value">
   perform action
</txp:smd_if>

Of course this won’t work if there are two or more checkboxes which contains another checkbox value (e.g. “ride” and “pride”) but this should be an unlikely evenience.

Last edited by redbot (2009-12-16 16:52:12)

Offline

Board footer

Powered by FluxBB