Jump to content

This topic is 7579 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I want to be able to edit each record's status (active or inactive) from a found list. What happens is if I find more than 1 record (say I do a search on last name "Smith") then the bottom record is always edited regardless of which one I choose.

I've looked at this and can't see where the problem lies.

Any suggestions?

<FORM name="f" METHOD="POST" ACTION="FMPro">

<INPUT TYPE="hidden" NAME="-db" VALUE="Student.fp5">

<INPUT TYPE="hidden" NAME="-lay" VALUE="StudentMain">

<INPUT TYPE="hidden" NAME="-format" VALUE="UpdateComplete.html">

<INPUT TYPE="hidden" NAME="-error" VALUE="Error.html">

<Table><TR>

[FMP-Record]

<td>[FMP-Field: L_name]</td>

<td>[FMP-Field: F_name]</td>

<td>[FMP-Field: SSN]</td>

<td>[FMP-Field: Status]</td>

<td><input type="hidden" name="-RecID" value="[FMP-CurrentRecID]">

<input type="radio" name="Status" value="Active" >Active

<input type="radio" name="Status" value="Inactive">Inactive

<input type="submit" name="-edit" value="Submit Edit"></td>

</tr>

[/FMP-Record]

</table>

</FORM>

Posted

Thanks Garry. Really don't want to edit multiple ones, just want to edit the one I choose from the list:

Name Status Edit Status (radio buttons)

Jo Smith Active Active Inactive Click here to Change (this is a button)

Al Smith Inactive Active Inactive Click here to Change

Su Smith Active Active Inactive Click here to Change

Does that make sense?

Posted

You need to put the input buttons into a FMP-IF statement

Here is an example I used which is on a record edit page (using Recid=CurrentRecID)

<input type="radio" name="publish" value="yes"[fmp-if:publish.eq.yes]checked[/fmp-if]>

Publish my lesson </font></p>

<p><font size="2">

<input name="publish" type="radio" value="no" [fmp-if:publish.eq.no]checked[/fmp-if]>

Not Ready for Publishing <br>

Posted

Try this:

<FORM name="f" METHOD="POST" ACTION="FMPro">

<INPUT TYPE="hidden" NAME="-db" VALUE="Student.fp5">

<INPUT TYPE="hidden" NAME="-lay" VALUE="StudentMain">

<INPUT TYPE="hidden" NAME="-format" VALUE="UpdateComplete.html">

<INPUT TYPE="hidden" NAME="-error" VALUE="Error.html">

<input type="hidden" name="-RecID" value="">

<input type="hidden" name="-edit" value="">

<Table><TR>

[FMP-Record]

<td>[FMP-Field: L_name]</td>

<td>[FMP-Field: F_name]</td>

<td>[FMP-Field: SSN]</td>

<td>[FMP-Field: Status]</td>

<td>

<input type="radio" name="Status" value="Active" >Active

<input type="radio" name="Status" value="Inactive">Inactive

<a href="#" onclick="document.f.elements['-RecID'].value='[FMP-CurrentRecID]';document.f.submit();">Click here to Change</a>

</td>

</tr>

[/FMP-Record]

</table>

</FORM>

This is the basis for submitting the change. However, the "Status" field and the method for using Radio Buttons need to be dealt with yet. (This leads to what theBloke has written.)

Good Luck.

Garry

This topic is 7579 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.