Extra field with a twitch

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 12-20-2006, 06:39 PM
New Pligger
 
Join Date: Oct 2006
Posts: 8
adding extra fields is easy, but what if I want to do something with the field? adding a form to it or a calendar etc, how can I modify just one of the extra fields?
Reply With Quote
  #2 (permalink)  
Old 01-27-2007, 09:55 AM
Casual Pligger
 
Join Date: Jan 2007
Posts: 46
I have the same question, and I having trouble with the appearance of the extra fields on my submit form. I cannot seem to get the field titles to align properly with the entry fields after the first one.

http://pandorastations.com
Reply With Quote
  #3 (permalink)  
Old 01-27-2007, 11:32 AM
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,215
There's a file called submit_extra_fields.tpl. This contains the html for all the extra fields. You can edit this however you want.
Reply With Quote
  #4 (permalink)  
Old 01-28-2007, 05:33 PM
New Pligger
 
Join Date: Jan 2007
Posts: 29
Thank you.. I've been looking for this as well.
Reply With Quote
  #5 (permalink)  
Old 04-06-2007, 04:21 PM
New Pligger
 
Join Date: Mar 2007
Posts: 21
I think I am not bright :-)

I just want to add extra field no 4 as drop down menu

Is it on extra_fields.php

define('Enable_Extra_Field_4', true);
define('Field_4_Title', 'misc field4');
define('Field_4_Instructions', 'this is where you put the instructions for this new field.');
<select name="Drop Down Menu ">
<option value="option 1">option 1</option>
<option value="option 2">option 2</option>
<option value="option 3">option 3</option>
<option value="option 4">option 4</option>
</select>
define('Field_4_Searchable', true);



and then on submit_extra_fields.tpl ,

{if $Enable_Extra_Field_4 eq 1}
<br />
<p class="l-mid"><label for="trackback">{$Field_4_Title}:</label>
<span class="form-note">{$Field_4_Instructions}</span><br />
<select name="Drop Down Menu" id="link_field4">
<option value="option 1">option 1</option>
<option value="option 2">option 2</option>
<option value="option 3">option 3</option>
<option value="option 4">option 4</option>
</select>
</p>
{/if}


Please advise
Reply With Quote
  #6 (permalink)  
Old 04-06-2007, 05:16 PM
cent's Avatar
Constant Pligger
 
Join Date: Jan 2007
Location: New York, NY
Posts: 180
You're going to need to remove the html form code from the <extra_fields.php> file. I believe you just need what you have in the <submit_extra_fields.tpl> file.
Reply With Quote
  #7 (permalink)  
Old 04-06-2007, 05:40 PM
New Pligger
 
Join Date: Mar 2007
Posts: 21
It did appear on the submit step 2 page
and I can select it.
However, the selected "option 1" did not
show up on the post ?

please advise
Reply With Quote
  #8 (permalink)  
Old 04-06-2007, 10:20 PM
New Pligger
 
Join Date: Mar 2007
Posts: 21
let me rephrase :-)

I followed your advise

I throw out the html form code from the <extra_fields.php> file
and then on submit_extra_fields.tpl , i just use
Quote:
{if $Enable_Extra_Field_4 eq 1}
<br />
<p class="l-mid"><label for="trackback">{$Field_4_Title}:</label>
<span class="form-note">{$Field_4_Instructions}</span><br />
<select name="Drop Down Menu" id="link_field4">
<option value="option 1">option 1</option>
<option value="option 2">option 2</option>
<option value="option 3">option 3</option>
<option value="option 4">option 4</option>
</select>
</p>
{/if}
On the submit page 2, http://abetter2007.com/submit.php
the option showed by default is "option 1".
Then, I clicked preview and submit, and then submit
it wasn't there.

I also tried adding one more line to the bottom
on submit_extra_fields.tpl

value="{$submit_link_field4}"

it's also not working

pls advise

Last edited by michael12happy; 04-06-2007 at 10:26 PM. Reason: typo error
Reply With Quote
  #9 (permalink)  
Old 04-07-2007, 08:09 PM
New Pligger
 
Join Date: Mar 2007
Posts: 21
Quote:
{if $Enable_Extra_Field_4 eq 1}
<br />
<p class="l-mid"><label for="trackback">{$Field_4_Title}:</label>
<span class="form-note">{$Field_4_Instructions}</span><br />
<select name="Drop Down Menu" id="link_field4">
<option value="option 1">option 1</option>
<option value="option 2">option 2</option>
<option value="option 3">option 3</option>
<option value="option 4">option 4</option>
</select>
</p>
{/if}

what are the things I should add on the above to make it work ?
Reply With Quote
  #10 (permalink)  
Old 05-16-2007, 07:44 AM
beatniak's Avatar
Pligg Donor
 
Join Date: Apr 2006
Location: NL - 52.100863;5.108356
Posts: 197
  1. enable extra fields in admin (!!!!)
  2. configure the extra fields in /libs/extra_fields.php. For every field you want enabled, set:
    Code:
    define('Enable_Extra_Field_1', false);
    to
    Code:
    define('Enable_Extra_Field_1', true);
  3. In BOTH of these files
    - submit_step_2.tpl
    - editlink_edit_center.tpl
    you paste the following code:
    Code:
      {if $Enable_Extra_Field_7 eq 1}
        <p class="l-mid"><label for="trackback">{$Field_7_Title}:</label>
        <span class="form-note">{$Field_7_Instructions}</span><br />
          <select name="link_field7" id="link_field7">
          <option value="option 1" {if $submit_link_field7 eq "option 1"}SELECTED{/if}>option 1</option>
          <option value="option 2" {if $submit_link_field7 eq "option 2"}SELECTED{/if}>option 2</option>
          <option value="option 3" {if $submit_link_field7 eq "option 3"}SELECTED{/if}>option 3</option>
          <option value="option 4" {if $submit_link_field7 eq "option 4"}SELECTED{/if}>option 4</option>
          </select>
        </p>
      {/if}
So basically you got the code right, but forgot one step i guess.

I added the {if $submit_link_field7 eq "option 2"}SELECTED{/if} code, because you want to keep the submitted data if you want to edit an article. Don't forget to edit that if your 2nd option is called "whatever" instead of "option 2".

Hope this helps.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Query missing. Using extra field as Magpierss's source Andtony Questions and Comments 2 11-27-2010 08:57 PM
Little anti spam extra field. gabs Questions and Comments 2 02-10-2010 07:20 PM
How to create tag cloud for a extra field? dasaxena Questions and Comments 2 07-28-2009 09:13 PM
Need to add 1 more extra field to the submit page - step2 aaronpais Questions and Comments 3 04-10-2008 03:37 PM
Problem with extra field... Lunatic Questions and Comments 0 09-30-2006 06:09 PM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development