Forum Activity for @ultrajam

SteveX
@ultrajam
04/11/14 01:57:26AM
2,589 posts

Custom form field attributes in form designer


Jamroom Developers

Thanks Michael, I think I'm going to take your first suggestion and just link to the module docs by appending a line to all form designer options help text (if the color picker is installed):
/**
 * Append to help text of form designer options field
 * @param $_data array Array of information from trigger
 * @param $_user array Current user
 * @param $_conf array Global Config
 * @param $_args array additional parameters passed in by trigger caller
 * @param $event string Triggered Event name
 * @return array
 */
function ujFullSpectrum_form_field_create_listener($_data, $_user, $_conf, $_args, $event)
{
    if (isset($_data['name']) && $_data['name'] == 'options' && isset($_data['sublabel']) && $_data['sublabel'] == 'see <strong>help</strong> for what is allowed here') {
        $_data['help'] = $_data['help'].'<br><br>&bull; If this is a <strong>spectrum</strong> color picker field, the options can be used to configure the color picker. See the module docs for details.';
    }
    return $_data;
}
SteveX
@ultrajam
04/11/14 01:26:18AM
2,589 posts

Custom form field attributes in form designer


Jamroom Developers

Thanks Michael, I don't think that will work though, it would change the help text for all form designer options fields. I guess I could add to the text for all form designer options fields though, so it might work that way.

I can't see anything in the log which would allow me to differentiate between my field and other form designer fields (the field type hasn't yet been set at the point where the help shows):

Quote:fdebug('ujFullSpectrum_form_field_create_listener',$_data, $_args, $event);

(2014-04-11T09:12:27+01:00 : 0.004)-(mem: 13631488)-(pid: 14665)-(ip: 127.0.0.1)-(uri: /audio/form_field_update/m=jrAudio/v=create/n=audio_color_test)
|ujFullSpectrum_form_field_create_listener|

(2014-04-11T09:12:27+01:00 : 0.004)-(mem: 13631488)-(pid: 14665)-(ip: 127.0.0.1)-(uri: /audio/form_field_update/m=jrAudio/v=create/n=audio_color_test)
Array
(
[name] => options
[label] => options
[sublabel] => see help for what is allowed here
[help] => • If this field is a select, select_multiple, radio or optionlist field, you can enter the form options ONE PER LINE, in the following format:Option Value|Option TextYou may also enter a valid module FUNCTION name that will return the options dynamically.• If this is a file field, you can enter the allowed file extensions as a comma separated list - i.e. "txt,pdf,doc,xls" - only files of these types will be allowed to be uploaded.• If this is a chained_select field, the options are created using the Chained Select module - set this to the Option Set Name you have created in the module.
[type] => textarea
[value] =>
[validate] => printable
[required] => 0
[module] => jrCore
)

(2014-04-11T09:12:27+01:00 : 0.004)-(mem: 13631488)-(pid: 14665)-(ip: 127.0.0.1)-(uri: /audio/form_field_update/m=jrAudio/v=create/n=audio_color_test)
Array
(
[module] => jrAudio
[form_name] => jrAudio_form_field_update
[designer] => 1
)

(2014-04-11T09:12:27+01:00 : 0.004)-(mem: 13631488)-(pid: 14665)-(ip: 127.0.0.1)-(uri: /audio/form_field_update/m=jrAudio/v=create/n=audio_color_test)
|form_field_create|
SteveX
@ultrajam
04/11/14 12:37:29AM
2,589 posts

referral program


Suggestions

If they are your own clients, why would you need them to click on your affiliate link?
SteveX
@ultrajam
04/11/14 12:27:09AM
2,589 posts

Custom form field attributes in form designer


Jamroom Developers

Yes its the help text IN the Form Designer.
Quote: • If this field is a select, select_multiple, radio or optionlist field, you can enter the form options ONE PER LINE, in the following format:

Option Value|Option Text

You may also enter a valid module FUNCTION name that will return the options dynamically.

• If this is a file field, you can enter the allowed file extensions as a comma separated list - i.e. "txt,pdf,doc,xls" - only files of these types will be allowed to be uploaded.

• If this is a chained_select field, the options are created using the Chained Select module - set this to the Option Set Name you have created in the module.
SteveX
@ultrajam
04/11/14 12:18:06AM
2,589 posts

categories in custom module


Jamroom Developers

No, ujCategories wont do that for you.

Look at jrBlog to see how its done.
SteveX
@ultrajam
04/10/14 10:57:15AM
2,589 posts

How do I Query action_data?


Jamroom Developers

action_data is stored in the db as a json array. If you are searching that unexpanded (and you know the number of licenses already) you could do something like this:
{$zid = $_items[0]['audio_distrib_lic_count']} 
{assign var='search5' value='action_data like %"audio_distrib_lic_count":"'|cat:$zid|cat:'"%}
        
{jrCore_list module="jrAction" profile_id=$_profile_id search5=$search5 order_by="_item_id desc"}

But you probably don't know the number of licenses, so, does the audio_distrib_lic_count field exist of there are 0 licenses?
If it doesn't, you could just search for the existence of the field name:

{assign var='search5' value='action_data like %"audio_distrib_lic_count"%}

If it does, maybe another search for not like would work, although I haven't tried that.

{assign var='search5' value='action_data like %"audio_distrib_lic_count"%}
{assign var='search6' value='action_data not like %"audio_distrib_lic_count":"0"%}

updated by @ultrajam: 04/10/14 10:59:14AM
SteveX
@ultrajam
04/10/14 07:46:14AM
2,589 posts

Cannot Install


Installation and Configuration

You should either choose a host which meets the requirements for Jamroom or change to a different cms.
updated by @ultrajam: 04/10/14 07:46:33AM
SteveX
@ultrajam
04/10/14 07:21:06AM
2,589 posts

Custom form field attributes in form designer


Jamroom Developers

Thanks Michael.

The form designer help is the standard help for the options field, so it mentions the optionlist format, and that the chained select module accepts different options. I couldn't see any way to alter the help in form designer from the module, probably a bit of jquery will do the job - its admin only so no need for it to be language aware. I've got to do something with it though, otherwise it is the wrong help/instructions the admin will see when they click on the help button (like they do ;)).
SteveX
@ultrajam
04/10/14 12:53:59AM
2,589 posts

Forum


Suggestions

No, I guess I mean the simplification thing, so forums like vanilla rather than forums like phpBB. Never seen IPB so I'm not sure where that falls on the spectrum.

I should probably have used "traditional" rather than "old style", or better "forums where an insignificant number of people use mobile devices". Where I live its around 90% mobile devices.
  163