May 18, 2013, 09:17:31 PM

Login with username, password and session length

FORUM POSTING GUIDELINES - Please read and follow them.

Pages: [1]
  Print  
Author Topic: Unset group in create_form  (Read 199 times)
Andreas Voigt
Full Member
***
Offline Offline

Posts: 76


« on: June 15, 2012, 08:23:54 PM »

Hi

i would like unset group with this code
Code:
<?php unset($groups['advertising']); ?>
but i don't now in which row?

Thanks and best regards

Andreas
« Last Edit: June 15, 2012, 08:57:10 PM by Alejandro » Logged
Alejandro
Global Moderator
Administrator
Hero Member
*
Offline Offline

Posts: 28335


« Reply #1 on: June 15, 2012, 08:59:43 PM »

There's no need to paste the whole file, we have a copy Wink What you want to do is outside the scope of support because the submission forms are not customizable. The code that renders the fields is this line:

<?php echo $CustomFields->makeFormFields($listing_fields,'listing',null,__t("Select",true));?>

So you can try unsetting it from the $listing_fields array. Make sure the keys are the field groups, although I think they are.
Logged

http://www.reviewsforjoomla.com/testimonials Leave a testimonial for JReviews
Andreas Voigt
Full Member
***
Offline Offline

Posts: 76


« Reply #2 on: June 16, 2012, 05:08:03 AM »

Hi,

hello, because there is another way to solve my problem? I want to maintain  group the "advertising" only for the admin.

Thanks an best regards

Andreas
Logged
Kristian
Global Moderator
Hero Member
*
Offline Offline

Posts: 9514



WWW
« Reply #3 on: June 16, 2012, 06:11:18 AM »

hello, because there is another way to solve my problem? I want to maintain  group the "advertising" only for the admin.

You don't need to customize the code for this. Every custom field has its own Access Settings for Submit/Edit:
http://screencast.com/t/Np4dAEG1b

So, you just need to deselect non-admin user groups for Submit/Edit access of all advertising fields.
Logged

Andreas Voigt
Full Member
***
Offline Offline

Posts: 76


« Reply #4 on: June 16, 2012, 11:05:26 AM »

Hi,

enclosed you can find image from my setting for access.

Thanks for help

Best regards

Andreas
Logged
Andreas Voigt
Full Member
***
Offline Offline

Posts: 76


« Reply #5 on: June 16, 2012, 05:39:07 PM »

Hi,

i think the problem related with this code for tabs:

Code:
<!-- START TABS IN CREATE FORM -->
<div id="jr_tabs" class="jr_tabs" style="margin-bottom: 15px;">
    <ul>
    <li><a href="#tab1">Beschreibung</a></li>
<li><a href="#tab2">Bilder</a></li>
<li><a href="#tab3">Bewertung</a></li>
    <?php $i=0;foreach($groups AS $title=>$fields):$i++;?>
    <li><a href="#field_group<?php echo $i;?>"><span><?php echo $title;?></span></a></li>
    <?php endforeach;?>
    </ul>
<!-- END TABS IN CREATE FORM -->

The code shows the group anyway, although no field from this groupe is activated or released.

Thanks and best regards

Andreas
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!