Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Added fields to include_form template not parsing

Quote Reply
Added fields to include_form template not parsing
Modify a link.

I've added additional fields to include_form.html template but whatever I enter does not parse. Do I need to add details to another file like modify.pm?

Example:
Code:
<div class="row clear">
<label for="DB_Column_5" class="name">Column 5:</label>
<div class="valueshort"><input type="text" id="DB_Column_5" name="Column 5" value="<%if DB_Column_5%><%escape_html DB_Column_5%><%endif%>" class="text"></div>
</div>
<div class="row clear">
<label for="DB_Column_6" class="name">Column 6:</label>
<div class="valueshort"><input type="text" id="DB_Column_6" name="Column 6" value="<%if DB_Column_6%><%escape_html DB_Column_6%><%endif%>" class="text"></div>
</div>
Anything modified in additional Column 5 or 6 fileds does not parse.

What am I missing or is it not possible to do this?

Last edited by:

MJB: Mar 14, 2020, 4:49 AM
Quote Reply
Re: [MJB] Added fields to include_form template not parsing In reply to
Can anyone help with this?

I add a new column in the links table then add the relevant code to the form template (see original post) but anything typed in to the form field does not save.
Quote Reply
Re: [MJB] Added fields to include_form template not parsing In reply to
You say it does not save the value ??

<input id="DB_Column_5" class="text" name="Column 5" type="text" value="<%if DB_Column_5%><%escape_html DB_Column_5%><%endif%>"></div>

Above line is from your HTML.


Are you sure the link property name is 'Column 5' ? since if I am not mistaken, db field shouldn't have space in it.


Also, you are using condition <%if DB_Column_5%> so in here you are saying that link field name is 'DB_Column_5'. Assuming this is right, try this:

<input id="DB_Column_5" class="text" name="DB_Column_5" type="text" value="<%if DB_Column_5%><%escape_html DB_Column_5%><%endif%>"></div>



Hope this helps.

Vishal
-------------------------------------------------------
Quote Reply
Re: [VishalT] Added fields to include_form template not parsing In reply to
Perfect thank you! Input id and name needed to be the same.

You're a star. Smile
Quote Reply
Re: [MJB] Added fields to include_form template not parsing In reply to
"Column 5" isn't a valid name :) It should be with _ or - (whatever you have in the DB). So Column_5

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!