Database Activity

Database Activity

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

評比平均分數: -
In reply to Peter Eckstein

Re: Database Activity

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 微笑

評比平均分數:Useful (1)