Posts by Jakeness

    Hi Guys,


    I'm a little stumped on this.


    I have a region on my contact page 'Contact Details':

    HTML
    1. <perch:repeater id="contactDetailRows" label="Contact Detail Items">
    2. <tr>
    3. <td><perch:content id="contactDetailTitle" label="Title" type="text"></td>
    4. <td><perch:content id="contactDetailItem" label="Contact Information" type="text"></td>
    5. </tr>
    6. </perch:repeater>


    I want to pull out the phone number from an item in this repeater. perch has given the field I want to grab the data from an id of 'perch_80_contactDetailRows_1_contactDetailItem'

    PHP: Here is my content_custom
    1. <?php
    2. perch_content_custom('Contact Details', [
    3. 'page'=>'/contact-us.php',
    4. 'template'=>'_footer_phonefax.html',
    5. 'filter'=>'contactDetailRows.perch_80_contactDetailRows_1_contactDetailItem',
    6. 'sort-order'=>'DESC',
    7. ]);
    8. ?>


    Am i calling the correct field in my content template?

    Code: my _footer_phonefax.html content file
    1. P: <perch:content id="perch_80_contactDetailRows_1_contactDetailItem" type="text">


    Where I want this to show is showing the 'P:' so the template is working, it's just not pulling the field data in.

    Thanks ellimondo


    I'll look into it, my PHP knowledge is pretty limited I might just make a select field for my customer to select a letter the song starts with and then just have a heap of filters to pull each letters result. I'd like to make it more automatic, but what you wrote above has gone straight over my head

    Hi drewm


    I've gone over and over this old forum post http://forum.grabaperch.com/fo…etail-pages-in-navigation


    I'm trying to get the submenu to output Each Staff Member as a submenu into the main navigation under the team menu. But I can't seam to get it to work.


    Here is the team list page: http://creaserconstructions.com.au/team-list

    Here is the team detail page: http://creaserconstructions.com.au/team/shaun-creaser


    Pretty sure the team_subnav_list.html is supposed to be in the /template/content folder or is it a navigation folder template file?

    HTML: team_subnav_list.html
    1. <li <perch:if exists="current_page"> class="selected"</perch:if>><a href="/staff/<perch:content id="slug" type="slug">"><perch:content id="teamStaffName" label="Staff Name" type="smarttext" ></a></li>

    Below is my Main Navigation template:


    Would you mind taking a look at my code, hopefully I'm missing something small.


    Thanks heaps for all your great work answering everyones questions!


    Regards

    I've been looking through the Docs and Forums for a while now but can't figure out a solution for this.


    I have this page of a website on a CMS that is closing down (Adobe Business Catalyst) http://tuffyworld.com.au/songlist I'm trying to replicate this page in perch, but I can't figure out the best way to output the items.


    HTML: Songlist item template
    1. <div class="songTitle">
    2.     <perch:content id="songName" type="smarttext" label="Song Title" title>
    3.     <perch:if exists="songArtist">
    4.     <div class="artistYes"><em>By</em> (<perch:content id="songArtist" type="smarttext" label="Artist">)</div>
    5. </perch:if>
    6. </div>


    PHP: Perch Content Custom
    1. <?php perch_content_custom('Song List', array(
    2.     'filter' => substr($title, 0,1),
    3.     'sort' => 'songName',
    4.     'match' => 'contains',
    5.     'value' => '2',
    6. )); ?>


    I can't even get this to output only the first item with a '2' in the name all items are showing.


    Sorry if this is a stupid question, I'm new to perch, LOVING IT, just my PHP knowledge is fairly basic (I've got 2 live website working great on perch with more to come)


    Can you please give me some direction with this issue.


    Thanks in advance

    Hi marc


    I've just read your thread from 1 year ago http://forum.grabaperch.com/fo…ces-from-field#reply_form but I'm still a little confused of what the <perch:content> tag should look like for the phone number?

    I was wondering if I could be a bother and ask for a little more details with where to put that filter code and the markup for the <perch:content> tag


    I am currently making 2 fields for the client to fill out one for 'Phone Number NO SPACES' & 'Public Phone Number' I think this is confusing and I would love to get this working so the client only has to update 1 field for the phone number.


    Any assistance would be greatly appreciated.

    Thanks for the shoutout Clive!


    Any questions, let me know.

    Hi ryan

    Thanks for you work on this plugin.


    I've edited this post a couple of times, I've seamed to get the google captcha working (I misspelt mbk_forms in the apps.php config file :P).


    I've added 'required' to recaptcha input and added a perch:error tag for 'g-recaptcha-response' if you forget to do the recatcha and click submit button website loads to the top of the website and you have to scroll back down to the form (the error message is showing and re-captcha has to be competed before form will submit correctly) is this correct? or is this field validation something that should work automatically with in mbk_forms app?

    HTML
    1. <perch:input type="hidden" id="g-recaptcha-response" class="g-recaptcha-response" required>
    2. <div class="g-recaptcha" data-sitekey="6LeOCbUUAAAAAPgnLFLpa_95w1Kr0NAU9gvBQzOS"></div>
    3. <perch:error for="g-recaptcha-response" type="required">
    4. <span class="error">Please confirm you are not a robot.</span>
    5. </perch:error>

    I've created my site in localhost, I did the test email under 'settings' -> 'email', the test email come through saying if I got it then all is good to go... but I've ticked the 'send response via email' in the form settings and submitted the form, all looks good in the perch dashboard, but no email arrives notifying me of the response.


    Is this something that doesn't work on localhost? but how did I receive the test email?

    Sorry if this is a dumb question but I've been searching the Docs and forum and can't find any answers for this.

    Thanks heaps for your reply Drew,


    The URL is outputting multiple values (http://localhost/hope/ministri…iesName%5B%5D=Youth+Group)


    But there are %5B%5D getting added to the URL and I'm getting an error on the web page:

    Warning: rawurldecode() expects parameter 1 to be string, array given in /Library/WebServer/Documents/hope/perch/core/runtime/core.php on line 11


    The error is referencing this line of code:

    PHP
    1. if (isset($_GET[$var]) && $_GET[$var]!='') {
    2. return rawurldecode($_GET[$var]);
    3. }


    I know that the %5B and %5D is code for [ & ] so I tried to replace them in the URL, but nothing happened with the results.


    Here is my updated form code:

    HTML
    1. <perch:form id="filter" method="get">
    2. <div>
    3. <perch:label for="ministryName">Type</perch:label>
    4. <perch:input type="checkbox" id="ministryName1" name="ministriesName[]" value="English Classes"> English Classes
    5. <perch:input type="checkbox" id="ministryName2" name="ministriesName[]" value="Youth Group"> Youth Group
    6. <perch:input type="checkbox" id="ministryName3" name="ministriesName[]" value="Hope Kids"> Hope Kids
    7. </div>
    8. <div><perch:input type="submit" value="Filter"></div>
    9. </perch:form>


    And here is my updated filter code:


    Looking forward to hearing from you

    I've only started using perch in the last few days. I've been able to get the filter form to filter results with a select box, but I'd like the user to be able to select multiple checkbox options and get a mix of results, I'm having trouble figuring this out, I added some '[ ]' to the php, but I must be missing something, when I click the filter button on the form, nothing happens and all the results still show.


    Below is my filter form code:

    Code
    1. <perch:form id="filter" method="get">
    2. <div>
    3. <perch:label for="ministryName">Type</perch:label>
    4. <perch:input type="checkbox" id="ministryName1" value="English Classes"> English Classes
    5. <perch:input type="checkbox" id="ministryName2" value="Youth Group"> Youth Group
    6. <perch:input type="checkbox" id="ministryName3" value="Hope Kids"> Hope Kids
    7. </div>
    8. <div><perch:input type="submit" value="Filter"></div>
    9. </perch:form>


    Here is my php code:


    Any assistance would be greatly appreciated :burd1fly: