Hi All,
I am having problems with an editable field.
When users open the card the first time the field says: "Click here to add the topic"
I want this line to dissapear when users click on the field, so that they can add their own text.
If they click in a save button next time they go to that card they should find what they wrote, but if they didnt write anything, they should find again the line "Click here to add the topic".
Any idea how to get it to work?
I thought the way to think about it was programming revolution to recognize the string and then writing a condition, but I havent been able to write the code so that revolutionrecognize the string "Click here to add the topic".
editable fields
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Hi mtdecor,
how about putting this into your card scriptand this into the script of the fieldjust make shure field "myField" is locked and the traversalOn is false from the beginning.
into the save button you put
see what happens and if it is what you want.
The way it is now the text of the field should be persistent.
Tell us if it is not what you want.
regards
Bernd[/code]
how about putting this into your card script
Code: Select all
on opencard
if field "myField" is "" then
put "Click here to add the topic" into field "myField"
end if
end opencard
Code: Select all
on mouseUp
if the text of me is not "Click here to add the topic" then exit mouseUp
set the locktext of me to false
set the traversalon of me to true
put empty into me
select before text of me
end mouseUp
on closefield
LockMe
end closefield
on focusOut
LockMe
end focusOut
on returninfield
LockMe
end returninfield
on enterinfield
LockMe
end enterinfield
on LockMe
set the locktext of me to true
set the traversalon of me to false
end LockMe
into the save button you put
Code: Select all
on mouseUp
send returninfield to field "myField"
--
-- continue with your saving
end mouseUp
The way it is now the text of the field should be persistent.
Tell us if it is not what you want.
regards
Bernd[/code]