Database Activity

Database Activity

by Peter Eckstein -
Number of replies: 1

I'm creating a database for my students where they will share url's. When I enabling "autolink the  URLs" as I configure the fields, an extra field called "text" appears under the add new entry tab. I am NOT enabling the "forced name for the link" option.  How do I make sure that "text" field doesn't appear when a new entry is created.

Thanks in advance!

Peter

Average of ratings: -
In reply to Peter Eckstein

Re: Database Activity

by Itamar Tzadok -

You can use css to hide it. Inspect the entry form in the browser to see how the input elements of the url field are rendered. In recent versions it's a table with the label and element of the url text as the second row.

Here is a simple illustration of the add template:

<div class="defaulttemplate"><table class="mod-data-default-template">
<tbody><tr class="r0">
<tr class="r1 lastrow">
<td class="template-field cell c0" style="">URL: </td>
<td class="template-token cell c1 lastcol" style="">URL</td>
</tr>
</tbody>
</table>
</div>

Enclose the field tag in the add template with an identified div:

<div class="defaulttemplate"><table class="mod-data-default-template">
<tbody><tr class="r0">
<tr class="r1 lastrow">
<td class="template-field cell c0" style="">URL: </td>
<td class="template-token cell c1 lastcol" style=""><div id="id_myurl">URL</div></td>
</tr>
</tbody>
</table>
</div>

Add css in the css tab of the activity:

#id_myurl table tr:nth-child(2) {
   display: none;
}

hth smile

Average of ratings:Useful (1)