• Hello Everyone

    i need little help..i want to insert a button in every post automitcally when any user click that button the text of that post automatcally go to the text area of form which i m using in my site u can see button in sms4smile site

    in the last of everypost there is a button named send/forward this sms to anyone in pakistan when you clcick that button the text automtically go to textbox please check n if anyone knows about that please tell me

    thanks,

    Regards,
    Danish

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator bcworkz

    (@bcworkz)

    There’s several possibilities, partly depending on where the destination textbox is located. If you have not yet determined this, it could be a separate page that opens in a pop-up window. Capture the onclick action of the button with javascript, which does a window.open() where the window URL includes an URL parameter containing the post ID.

    The window URL points to a template on your site containing the SMS form. This template, when requested, gets the post ID from the URL parameter and queries the DB for the post content, which is output as the textbox value for the SMS form element.

    Thread Starter danishsameer

    (@danishsameer)

    yp u r right here is my site SMSPUFF please check n give me the coding if u can please

    Thanks in advance

    Moderator bcworkz

    (@bcworkz)

    Sorry, I don’t have any code similar to this that I could provide. If you break down the task into small components, you should be able to find examples of each which you can build into functional code. Most of it is standard website coding. I’ll get you started with a couple WP related components.

    To add the URL parameter to whatever link ($link) you build to request the SMS form use something like this (inside the “Loop”):
    $link .= '?post_id=' . get_the_ID();

    Then on the template that generates the form, between the <textarea> tags place something like this:
    <?php echo get_post_field( 'post_content', $_GET['post_id']); ?>

    Hi Friends i have website Hindi Shayari SMS Love Sad kavitayen Suvichar Ghazal Hindi geet Lyrics

    i need help i want wordpress Text Button coding ?????

    Moderator bcworkz

    (@bcworkz)

    @newshayari.com

    Hello! We ask everyone to start a new topic in these forums instead of reviving threads started by others. It’s also not clear what you mean by “text button coding”. When you start your new topic, please provide an example of your meaning to help us understand better. Thank you.

    I am also trying to apply this in my site smsexplore, i will update you once i fixed it

    Thread Starter danishsameer

    (@danishsameer)

    okkk

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Need Fwd Text Button’ is closed to new replies.