solved Audio Pro - Form Builder

MetalScene
MetalScene
@themetalscene
4 years ago
66 posts
Hi there
i am creating the forms entries for profiles, they work in the settings and the admin but dont show on the profiles, am i missing something.

How do i get it to display on the front end once created.

thanks
updated by @themetalscene: 08/04/20 09:28:35PM
michael
@michael
4 years ago
7,714 posts
Are you talking about "Simple Custom Forms"
https://www.jamroom.net/the-jamroom-network/documentation/modules/2885/simple-custom-forms

or the "Form Designer"
https://www.jamroom.net/the-jamroom-network/documentation/jamroom-admin-handbook/1275/using-the-form-designer

Its my guess that you're talking about adding extra values to modules using the Form Designer, if its that, then the designer is just the first part. Its the location that the information is collected and put into the database.

From there to get the information to show you need to get it out of the database, that's the job of the skins. Skins format the information from the database in whatever structure you want.

So if you went into the audio module's custom form designer and added a text area to collect "Composer" and saved it to audio_composer then in the skin templates where you see all the other variables like {$item.audio_title} then you could use {$item.audio_composer} and the value entered would show.
MetalScene
MetalScene
@themetalscene
4 years ago
66 posts
i found this,Using the Form Designer tool

thank you :)
MetalScene
MetalScene
@themetalscene
4 years ago
66 posts
Ok a little help if anyone can, re familiarizing myself with JR.

I stuck the following code in after creating my forms and adding to my language files.

(i am still makign icons before i change the one i am using as a template)

Below is what i added to profile_sidebar.tpl of the Audio Pro skin

<span>{jrCore_icon icon="calendar" size="16" color="ff5500"} {jrCore_lang skin="jrAudioPro" id=97 default="Genre: "} {$profile_genre} </span>
<span>{jrCore_icon icon="calendar" size="16" color="ff5500"} {jrCore_lang skin="jrAudioPro" id=95 default="Date Formed: "} {$profile_startdate|jrCore_date_format:"%Y"} </span>
<span>{jrCore_icon icon="calendar" size="16" color="ff5500"} {jrCore_lang skin="jrAudioPro" id=96 default="Date Split: "} {$profile_splitdate|jrCore_date_format:"%Y"} </span>
<span>{jrCore_icon icon="calendar" size="16" color="ff5500"} {jrCore_lang skin="jrAudioPro" id=98 default="Current Status: "} {$profile_status} </span>

My question is:

1. how do i limit these options for a specific quota such as my artist quota only
2. how do i make the Genre and the Status searchable in a list of sorts, so you can find "active" bands, "split up" bands, "on hold" bands or search by the primary genre in line 1
3. how do i make it so if left blank the split option wont show at all.


sorry for so many questions.. Been searching documentation for it
updated by @themetalscene: 05/04/20 02:02:42PM
MetalScene
MetalScene
@themetalscene
4 years ago
66 posts
Also when you create a form designer option that requires that calendar / date selection in the DARK skin,
the calendar that pops up for you to choose the date is snow white and you cant see anything.
definite css issue in the template there, for a future update.
updated by @themetalscene: 05/04/20 03:54:20PM
michael
@michael
4 years ago
7,714 posts
First off, if your site is only ever going to be in english, you dont need to use the language feature, that will make it simpler.

so instead of:
<span>{jrCore_icon icon="calendar" size="16" color="ff5500"} {jrCore_lang skin="jrAudioPro" id=97 default="Genre: "} {$profile_genre} </span>
you can just use:
<span>{jrCore_icon icon="calendar" size="16" color="ff5500"} Genre: {$profile_genre} </span>

It really depends on how you like to work. The language strings are there for users who want to be able to customize the site without the need to look at code. If you're comfortable looking at code the best workflow (the one I like) is to keep out of the ACP for all skin customizations. There is an over-ride system for working with templates that allows you to adjust at the coding level.

From the question im making the assumption you're using the TEMPLATES tab to make your changes. The other way to do it is to clone your skin, then make adjustments via SFTP. Which you prefer depends on you comfort level with code.

For web developers the preferred workflow (the one I like) is:
* clone the skin from jrAudioPro to xxAudioProCustom (or any name you choose)
* download xxAudioProCustom into your development environment (I use phpstorm)
* adjust the xxAudioProCustom/profile_sidebar.tpl and upload it back to the site
* (either) run the site in "Developer Mode" so the caches are off, (OR) reset the caches to see your changes.
(repeat)

back to the question:
1. you will need to find out what the correct variable is that holds the quota id, for that adding {debug} to the templates will get you a list of what variables are available in each template, see these docs for more info:
Docs: {debug}
https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide/1477/debug

it will probably be something like:
{if $_profile.quota_id == 3}
 show whatever you want to quota id 3 here.
{/if}

2. add your new form field to the "Additional search fields" section of the ACP then rebuild the search index:
https://www.jamroom.net/the-jamroom-network/documentation/modules/950/search#rebuild-the-search-index

3. check it for string length
{if strlen($profile_genre) > 0}
this will show if the string length of the $profile_genre field is longer than zero characters
{/if}
search.jpg
search.jpg  •  1.1MB

MetalScene
MetalScene
@themetalscene
4 years ago
66 posts
Thank you
MetalScene
MetalScene
@themetalscene
4 years ago
66 posts
Ok i seem to have it working, if anyone is watching or wants to know.

i did this
{if $profile_quota_id == 1}
<span>{jrCore_icon icon="calendar" size="16" color="ff5500"} {jrCore_lang skin="jrAudioPro" id=97 default="Genre: "} {$profile_genre} </span>
<span>{jrCore_icon icon="calendar" size="16" color="ff5500"} {jrCore_lang skin="jrAudioPro" id=95 default="Date Formed: "} {$profile_startdate|jrCore_date_format:"%Y"} </span>
<span>{jrCore_icon icon="calendar" size="16" color="ff5500"} {jrCore_lang skin="jrAudioPro" id=98 default="Current Status: "} {$profile_status} </span>
{/if}

{if strlen($profile_splitdate) > 0}
<span>{jrCore_icon icon="calendar" size="16" color="ff5500"} {jrCore_lang skin="jrAudioPro" id=96 default="Date Split: "} {$profile_splitdate|jrCore_date_format:"%Y"} </span>
{/if}

which dealt with points 1 & 3

busy working on 2 now.


thanks again everyone.
MetalScene
MetalScene
@themetalscene
4 years ago
66 posts
The site is being set up in 11 languages, as we have 11 official ones. Most the words due to the nature of the site will be the same, mostly T&C etc that will be in the other languages.
For now the language file is useful.

Tags